[ python-Bugs-1210832 ] An error in Python Tutorial
SourceForge.net
noreply at sourceforge.net
Sun May 29 17:28:44 CEST 2005
Bugs item #1210832, was opened at 2005-05-29 23:28
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1210832&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Gene (godhand)
Assigned to: Nobody/Anonymous (nobody)
Summary: An error in Python Tutorial
Initial Comment:
In section 4.4, the program should be written as follow
to get the correct result:
--------------------------------------------------------------
for n in range(2, 10):
for x in range(2, n):
if n % x == 0:
print n, 'equals', x, '*', n/x
break
if x == n-1:
print n, 'is a prime number'
--------------------------------------------------------------
besides, the line "2 is a prime number" should not
appear in the result output.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1210832&group_id=5470
More information about the Python-bugs-list
mailing list