Don't output floats in prime example.

This commit is contained in:
Georg Brandl 2008-05-01 18:06:50 +00:00
parent de4296281a
commit b03c1d98a2

View File

@ -166,7 +166,7 @@ following loop, which searches for prime numbers::
>>> for n in range(2, 10):
... for x in range(2, n):
... if n % x == 0:
... print(n, 'equals', x, '*', n/x)
... print(n, 'equals', x, '*', n//x)
... break
... else:
... # loop fell through without finding a factor