New submission from CH <joecheng...@gmail.com>:

range function second parameter is excluded. Hence for x in range(2, n): will 
not execute when n = 2, and "2 is a prime number" will never appear.
Moreover, might need a break in the else block too.

----------
messages: 316158
nosy: joesatriani
priority: normal
severity: normal
status: open
title: 4.4. break and continue Statements, and else Clauses on Loops

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33424>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to