Python basic arithmetic

Python arithmetic

Addition

8 + 4
12
8 + 1.0
9.0
8 + 1
9
8.0 + 1.0
9.0

Substraction

8 - 4
4
8 - 1.0
7.0
8 - 1
7
8.0 - 1.0
7.0

Multiplication

8 * 4
32
8 * 2.0
16.0
8.0 * 2.0
16.0

Division - floor

12 // 4
3
12 // 5
2
12.0 // 4.00
3.0
12.0 // 5.00
2.0

Division

12 / 4
3.0
12 / 5
2.4
12.0 / 4.0
3.0

Modulus

12 % 5
2
12 % 5.0
2.0
12.0 % 5
2.0
12.0 % 5.0
2.0

Exponation

# Not ^ !
2 ^ 2
0
2 ** 2
4
2 ** 3
8
2 ** 3
8
2.0 ** 3
8.0