Skip to main content

Python

Math operations

OperatorsOperationExample
**Exponent2 ** 3 = 8
%Modulus/Remainder22 % 8 = 6
//Integer division22 // 8 = 2
/Division22 / 8 = 2.75
*Multiplication3 * 3 = 9
-Subtraction5 - 2 = 3
+Addition2 + 2 = 4

Resources

Python Cheatsheet