Hi,
Would you please help me by explaining that why " 5 " is skipped and not
printed in the following program?
Thank you.
Najam.
count = 0
while True:
count += 1
# end loop if count is greater than 10
if count > 10:
break # means "break out of the loop"
# skip 5
if count == 5:
continue # means "Jump back to the top of the looop"
print count
raw_input("\n\nPress the enter key to exit.")
Output:
1
2
3
4
6
7
8
9
10
Press the enter key to exit.
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor