+ 1

I can't print finished at last , don't know why ?

i=0 while 1==1: print(i) i=i+1 if i<=5: print("breaking") break print("finished") then pushed enter and so on : file "<stdin>" , line 7 print("finished") ^

12th Jul 2016, 11:19 AM
Reza Zarakani400000
Reza Zarakani400000 - avatar
3 Antworten
+ 2
It works fine. Maybe you added an extra symbol in a previous line somewhere in the code you ran.
12th Jul 2016, 11:28 AM
Gershon Fosu
Gershon Fosu - avatar
+ 2
its printing 0 Breaking finished
12th Jul 2016, 5:01 PM
Subhankar Paul
Subhankar Paul - avatar
0
reza please call me 09015141312 thannks
18th Sep 2017, 11:54 PM
alireza naderi
alireza naderi - avatar