- 1
What's the result of the following code? Please give the answer with explain. b=20 while True: if b<9: continue
Answer it if possible
2 Antworten
+ 4
Why don't you try it on your own on sololearn's code playground.
0
no result, just infinite loop (timeout limit reached error in contexts such as sololearn's code playground) as even if b was magically modified to something lesser than 9 the while loop will never exit...
to exit the infinite while loop, you need to have a reachable 'break' statement rather than a 'continue' one...
... and anyway, there's nothing to output any result ;P