mirror of
https://github.com/python/cpython.git
synced 2024-12-04 07:15:09 +08:00
Don't output floats in prime example.
This commit is contained in:
parent
de4296281a
commit
b03c1d98a2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user