Dyskusje Q&A
Please explain.
0 głosów
2 odpowiedziWorking on Files
0 głosów
2 odpowiedziWhy this code has no output?
0 głosów
1 OdpowiedźIn the continue Loop -
i = 0
while True:
i = i +1
if i == 2:
print("Skipping 2")
continue
if i == 5:
print("Breaking")
break
print(i)
print("Finished")
It shows the output being
"1
Skipping 2
3
4
Breaking
Finished"
Why are the last three lines not
"Breaking
5
Finished"
Where it shows print(i) after break?
1 Głos
3 odpowiedziArray
-1 Głos
2 odpowiedziPopularne dzisiaj
Quiz
0 Votes
Sockets, etc
0 Votes
Necesitó ayuda
1 Votes
C++ Vectors
0 Votes
A Little Question Here!
1 Votes
Code challenge
0 Votes