🐸

The Name Tag

Python Basicspython-basics-03-the-name-tag
Reward: 50 XP
|

Bad Labels

Hoppy tries to label his boxes, but some labels keep falling off. The computer is very picky about names!

Rules of Naming

  • No Spaces: my energy is bad. Use my_energy.

  • No Numbers at Start: 1st_box is bad. Use box_1.

  • Be Descriptive: score is better than s.

Your Mission

1
Fix the Code

The code below is broken because of bad variable names. Fix the names so the code can run.

2
Print it

Make sure to print the fixed variable.

Snake Case

In Python, we usually use snake_case (lowercase words separated by underscores).

Suggested Solution
Click to expand

Change player score to player_score:

player_score = 100
print(player_score)
Advanced Tips
Want more? Click to expand

Python programmers love snake_case. We use all lowercase letters and underscores between words.

It's a Python tradition that makes code easier to read!

pymain.py
Loading...
Terminal
Terminal
Ready to run...