diff options
author | Fred Drake <fdrake@acm.org> | 2001-05-21 16:55:39 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-05-21 16:55:39 (GMT) |
commit | 8b0b8409aedac3ca86648b685b773ae543f327e5 (patch) | |
tree | 8a47d80b829c3be9a06b4e0b3dd8cca0583a839b /Doc/tut/tut.tex | |
parent | 24e621918bc00d08e02cb7d92ef9a2e08cfcb49d (diff) | |
download | cpython-8b0b8409aedac3ca86648b685b773ae543f327e5.zip cpython-8b0b8409aedac3ca86648b685b773ae543f327e5.tar.gz cpython-8b0b8409aedac3ca86648b685b773ae543f327e5.tar.bz2 |
Update output to reflect additional precision produced by the repr() of
floating point numbers in an interactive example.
Added comment to help explain control flow in the example code showing
how to check if a number is prime.
This closes SF bugs 419434 and 424552.
Diffstat (limited to 'Doc/tut/tut.tex')
-rw-r--r-- | Doc/tut/tut.tex | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/tut/tut.tex b/Doc/tut/tut.tex index c8176d2..e71eac9 100644 --- a/Doc/tut/tut.tex +++ b/Doc/tut/tut.tex @@ -1166,6 +1166,7 @@ which searches for prime numbers: ... print n, 'equals', x, '*', n/x ... break ... else: +... # loop fell through without finding a factor ... print n, 'is a prime number' ... 2 is a prime number @@ -2609,10 +2610,10 @@ reverse quotes (\code{``}). Some examples: \begin{verbatim} >>> x = 10 * 3.14 ->>> y = 200*200 +>>> y = 200 * 200 >>> s = 'The value of x is ' + `x` + ', and y is ' + `y` + '...' >>> print s -The value of x is 31.4, and y is 40000... +The value of x is 31.400000000000002, and y is 40000... >>> # Reverse quotes work on other types besides numbers: ... p = [x, y] >>> ps = repr(p) |