Answer: Python Puzzler #2502

The answer is B. The program prints:

Level 5

This answer was checked by running the program for real.

Why?

Python works out level + 2 first, which is 5. str() turns the number into text so it can be joined onto “Level “.

The code again

level = 3
print("Level " + str(level + 2))

Try it: change one number in the program and predict the new output before you run it.