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 | Kyte999 |
|---|---|
| Recipients | Kyte999, georg.brandl |
| Date | 2008年03月08日.00:40:07 |
| SpamBayes Score | 0.14984258 |
| Marked as misclassified | No |
| Message-id | <1204936809.05.0.981645183837.issue2257@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
The code from section 4.4 of the tutorial follows. This code does not produce the output shown. Adding a final break statement will fix this. >>> 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 |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年03月08日 00:40:09 | Kyte999 | set | spambayes_score: 0.149843 -> 0.14984258 recipients: + Kyte999, georg.brandl |
| 2008年03月08日 00:40:09 | Kyte999 | set | spambayes_score: 0.149843 -> 0.149843 messageid: <1204936809.05.0.981645183837.issue2257@psf.upfronthosting.co.za> |
| 2008年03月08日 00:40:07 | Kyte999 | link | issue2257 messages |
| 2008年03月08日 00:40:07 | Kyte999 | create | |