Answer: Python Puzzler #2556

The answer is D. The program prints:

Level 6

This answer was checked by running the program for real.

Why?

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

The code again

level = 1
print("Level " + str(level + 5))

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