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 #604
print("Py"*2*True)
First, True , as a boolean, evalutes as 1.0. Then, "Py" is multiplied by 2 and 1 resulting in PyPy . (pythoncentral.io/use-python-multiply-strings)
What is the output of the code snippet below?
— The Python Quiz (@thepythonquiz) November 3, 2020
print("Py"*2*True)
PyPy
"Py"*2*True
It will throw a SyntaxError error.
Py*2
Py*2*True#python #python3 #pythonprogramming #learnpython
Question difficulty: π΅π΅π΅π΅π΅