livepython.net

49. Fix a Python Program by Commenting Out an Unfinished Line

MediumComment out

Overview

Switch off a line that isn't ready yet, so the rest of the program runs.

Problem Statement

One line in the starter code isn't finished, so the whole program stops with an error. Don't fix it: comment it out, so the program prints:

Player: Sunny
Level: 3
Game saved

Input

No input is required for this question.

Output

Player: Sunny
Level: 3
Game saved

Learn this firstChapter 6 · Commenting Out Code to Test and Debug
solution.py
player = "Sunny"
level = 3
print("Player:", player)
print("Level:", level)
print("Score: " + score)
print("Game saved")

EXPECTED OUTPUT

1Player: Sunny
2Level: 3
3Game saved

YOUR OUTPUT

Press Run to see your output here. Lines are compared with the expected output.