

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: Python Numbers
incomplete
2: Numbers Review
incomplete
3: Floor Division
incomplete
4: Exponents
incomplete
5: Changing in Place
incomplete
6: Plus Equals
incomplete
7: Scientific Notation
incomplete
8: Logical Operators
incomplete
9: Not
incomplete
10: Binary Numbers
incomplete
11: Bitwise '&' Operator
incomplete
12: Bitwise '|' Operator
incomplete
13: Damage Meter
incomplete
14: Converting Binary
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
In Python, numbers without a decimal point are called Integers – just like they are in mathematics.
Integers are simply whole numbers, positive or negative. For example, 3 and -3 are both examples of integers.
Arithmetic can be performed as you might expect:
2 + 1
# 3
2 - 1
# 1
2 * 2
# 4
3 / 2
# 1.5 (a float)
This one is actually a bit different – division on two integers will actually produce a float. A float is, as you may have guessed, the number type that allows for decimal values.
Complete the missing sections of the calculate_damage function.
total_damage variable so that it contains the sum of all the different weapons' and spells' damage values.average_damage variable so that it contains the average of the combined weapon and spell damage.