0

I don't get it why isnt the output 5 6 7 8 9 i=5 while i<=10: print(i) i=i+1 if i==9: break output= 5 6 7 8

16th Jan 2018, 7:38 PM
Cnscodes
Cnscodes - avatar
5 Réponses
+ 7
If you want it to print 9, put the print(i) line after the i = i + 1 line.
17th Jan 2018, 2:26 AM
David Ashton
David Ashton - avatar
+ 1
why should it be 5 6 7 8 9 in your opinion?
16th Jan 2018, 7:40 PM
Jeremy
Jeremy - avatar
0
because it's suppose to stop if it nine
16th Jan 2018, 7:42 PM
Cnscodes
Cnscodes - avatar
0
which it does
16th Jan 2018, 7:42 PM
Jeremy
Jeremy - avatar
0
oh ye sorry
16th Jan 2018, 7:44 PM
Cnscodes
Cnscodes - avatar