Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b03c1d9

Browse files
committed
Don't output floats in prime example.
1 parent de42962 commit b03c1d9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/tutorial/controlflow.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ following loop, which searches for prime numbers::
166166
>>> for n in range(2, 10):
167167
... for x in range(2, n):
168168
... if n % x == 0:
169-
... print(n, 'equals', x, '*', n/x)
169+
... print(n, 'equals', x, '*', n//x)
170170
... break
171171
... else:
172172
... # loop fell through without finding a factor

0 commit comments

Comments
 (0)