Answer: Python Puzzler #2444

The answer is A. The program prints:

Level 9

This answer was checked by running the program for real.

Why?

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

The code again

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

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