Am I the only one getting 'Skipping 2' as an the output? for the following program in python: | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Am I the only one getting 'Skipping 2' as an the output? for the following program in python:

i = 0 while True: i = i +1 if i == 2: print("Skipping 2") continue if i == 5: print("Breaking") break print(i) print("Finished")

2nd Mar 2018, 1:43 PM
Msizi
8 Answers
0
what language ? put ur code in play ground so we could test it ....
2nd Mar 2018, 1:53 PM
Farshaad Heydari
Farshaad Heydari - avatar
0
doesn't run on python for some reason (desktop that is).
2nd Mar 2018, 1:58 PM
Msizi
0
copy ur code in play ground.....
2nd Mar 2018, 2:01 PM
Farshaad Heydari
Farshaad Heydari - avatar
0
The code itself is correct (works for me) As already suggested, paste in playground and post it here.
2nd Mar 2018, 3:51 PM
Marco Polidori
Marco Polidori - avatar
0
In the code above 'print(i)' towards the end seems redundant.
2nd Mar 2018, 4:07 PM
Msizi
0
your not gonna put your code in playground, r u ?!😐
2nd Mar 2018, 4:09 PM
Farshaad Heydari
Farshaad Heydari - avatar
0
I have. Never mind my last question. It too was redundant it seems.
2nd Mar 2018, 4:10 PM
Msizi
0
well , then send a link of your code here!!!
2nd Mar 2018, 4:16 PM
Farshaad Heydari
Farshaad Heydari - avatar