Il 27/12/2010 14.44, Chrystal ha scritto:
> Hi guys
> 
> I'll be happy if someone can help evaluate the result of this statement:
> 
>     for n in range (3, 20):
>     for x in range (2, n):
>     print (n)
> 
> 
> I tried but couldn't figure out why the loop returned such a result
> 
> Merry Christmas
> 
> Thanks
>  
> 
What result is so strange for you? I get a perfectly understandable

3
4
4
5
5
5
6
6
6
6
7
7
7
7
7
...
And so on up to 19 repeated 17 times...

cheers
paolino
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to