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 #858
print(bool(exit(0)))
The Python interpreter will find the exit(0) function when it parses the code before executing print() and exit the program. Nothing will be printed. (help.semmle.com/wiki/pages/viewpage.action?pageId=29394142)
What is the output of the code snippet below?
— The Python Quiz (@thepythonquiz) June 16, 2021
print(bool(exit(0)))
Nothing will be printed.
False
It will throw a SyntaxError error.
True
π Comment the answer, like and retweet! #python
Question difficulty: π΅π΅π΅π΅π΅
Similar questions: