mirror of
https://github.com/python/cpython.git
synced 2025-07-23 19:25:40 +00:00
Don't output floats in prime example.
This commit is contained in:
parent
de4296281a
commit
b03c1d98a2
1 changed files with 1 additions and 1 deletions
|
@ -166,7 +166,7 @@ following loop, which searches for prime numbers::
|
||||||
>>> for n in range(2, 10):
|
>>> for n in range(2, 10):
|
||||||
... for x in range(2, n):
|
... for x in range(2, n):
|
||||||
... if n % x == 0:
|
... if n % x == 0:
|
||||||
... print(n, 'equals', x, '*', n/x)
|
... print(n, 'equals', x, '*', n//x)
|
||||||
... break
|
... break
|
||||||
... else:
|
... else:
|
||||||
... # loop fell through without finding a factor
|
... # loop fell through without finding a factor
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue