

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Variables
incomplete
2: Variables Vary
incomplete
3: Math
incomplete
4: Negative Numbers
incomplete
5: Comments
incomplete
6: Variable Names
incomplete
7: Basic Variable Types
incomplete
8: F-Strings in Python
incomplete
9: NoneType Variables
incomplete
10: NoneType Quiz
incomplete
11: Dynamic Typing
incomplete
12: Math With Strings
incomplete
13: Multi-Variable Declaration
incomplete
14: Boots
incomplete
15: Spellbook
incomplete
16: Character Report
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Variables are called "variables" because they can hold any value and that value can change (it varies).
For example, this code prints 20:
acceleration = 10
acceleration = 20
print(acceleration)
The line acceleration = 20 reassigns the value of acceleration to 20. It overwrites whatever was being held in the acceleration variable before (10 in this case).
We need to reduce our hero's health as they take damage.
Before each print() function in the provided code, change the value of player_health to 100 less than it was before.
The final output should look like this:
900
800
700
600