This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author str8lazy
Recipients str8lazy
Date 2008-02-28.16:42:52
SpamBayes Score 0.07696581
Marked as misclassified No
Message-id <1204216974.8.0.2644106888.issue2201@psf.upfronthosting.co.za>
In-reply-to
Content
Section 4.4 of the tutorial gives example code: 

>>> for n in range(2, 10):
...     for x in range(2, n):
...         if n % x == 0:
...             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
3 is a prime number
4 equals 2 * 2
5 is a prime number
6 equals 2 * 3
7 is a prime number
8 equals 2 * 4
9 equals 3 * 3

When one is to enter the code (print n, 'equals' x, '*' n/x) you are
given syntax error:   File "<stdin>", line 4
    print n, 'equals' x, '*' n/x
                      ^
SyntaxError: invalid syntax
History
Date User Action Args
2008-02-28 16:42:55str8lazysetspambayes_score: 0.0769658 -> 0.07696581
recipients: + str8lazy
2008-02-28 16:42:54str8lazysetspambayes_score: 0.0769658 -> 0.0769658
messageid: <1204216974.8.0.2644106888.issue2201@psf.upfronthosting.co.za>
2008-02-28 16:42:53str8lazylinkissue2201 messages
2008-02-28 16:42:53str8lazycreate