Home › Learn by Playing › Python › Guess the Output
Python · Quiz game · 5 levels
Guess the Output
Read a short Python program and pick exactly what it prints. Every answer comes with a simple explanation, so even a wrong guess teaches you something.
How to play
- Each level has 3 or 4 short programs. Read the code line by line, like Python does, from top to bottom.
- Tap the answer you think is right. Some answers are errors such as
TypeError: pick one of those if you think the program crashes. - Stars: no mistakes is 3 stars, one mistake is 2 stars, more is 1 star.
Want to check an answer yourself? Install Python 3 from python.org, save the code as a .py file and run it.