This lesson's interactive features are locked, please to keep using them
Now that we know how to store and change the value of variables let's do some math! Here are examples of common mathematical operators using Python syntax.
my_sum = a + b
my_difference = x - y
my_product = c * d
my_quotient = a / b
Parentheses can be used to order math operations:
first = 5
second = 7
third = 9
average_value = (first + second + third) / 3
print(average_value)
Which prints 7, the average of 5, 7, and 9.
Create a new variable called armored_health on line 3 and set it equal to player_health multiplied by armor_multiplier.