Now that we know how to assign values to variables we can now use Pythons math operators to make calculations with these variables. Let's start by defining some numeric variables and then performing some math operations with them.

a = 2

b = 5

c = 10

d = 17

b = 5

c = 10

d = 17

a + b

> 7

c - a

> 8

a * c

> 20

c * b

> 2.0

c ** 2

> 100

The Python remainder or **Modulo** operator calculates the value left over after dividing the number or variable on the left with the number or variable on the left.

d % c

> 7

The Python **Floored Quotient** operator calculates how many times the number or variable on the right goes into the number or variable on the left, rounded down the closest integer.

d // c

> 1

Next