[docs] About loops

Blanca Mancilla blancalmancilla at gmail.com
Fri Jul 5 14:49:37 CEST 2013


and of course there are some test missing as whatever is not even is first
declared prime.
bm


On Fri, Jul 5, 2013 at 8:26 AM, Blanca Mancilla
<blancalmancilla at gmail.com>wrote:

> Hi,
> In section 4.4 break and continue Statements and else Clauses in loops,
> the first program has an issue:
> the second for: for x in range(2,n) is not entered in the first iteration
> of the n for (for n in range(2,10))
> as range (2,2) give an empty range:
>
> >>> range(2,2)
> []
>
> therefore 2 is never "declared" prime.
>
> Also the break is in the wrong place.
>
> bm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20130705/516cd809/attachment-0001.html>


More information about the docs mailing list