]> granicus.if.org Git - python/commitdiff
Don't output floats in prime example.
authorGeorg Brandl <georg@python.org>
Thu, 1 May 2008 18:06:50 +0000 (18:06 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 1 May 2008 18:06:50 +0000 (18:06 +0000)
Doc/tutorial/controlflow.rst

index 4404ab239ad55e309cd95cc176aaff582cd294a9..dee6e7c32687bbd8fe24c01ef11742188542e95a 100644 (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