The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
Question #879
running = True
while running:
print(1)
running = False
continue
print(2)
Every time the continue keyword is reached within the while loop, the execution jumps to the next iteration of the loop. print(2) is never reached. (tutorialspoint.com/python/python_continue_statement.htm)
What is the output of the code snippet below?
— The Python Quiz (@thepythonquiz) June 21, 2021
running = True
while running:
print(1)
running = False
continue
print(2)
It will throw a SyntaxError exception.
1
1
2
π Comment the answer, like and retweet! #python
Question difficulty: π΅π΅π΅π΅π΅