Lesson Contents
Arithmetic operators are one of the Python operators and we can use them to perform calculations like addition, subtraction, multiplication, etc. In this lesson, I’ll show you the different options.
Addition
We can add two or more numbers together:
>>> 1 + 1
Will show this output:
2
Subtraction
Subtract a value:
>>> 5-1
Will show this output:
4
Multiplication
We can also multiply two values:
>>> 4 * 4
Will show this output:
16
Division
Or do a division:
>>> 9 / 3
Will show this output:
3.0
Modulus
We can also calculate the remainder of a division:
>>> 11 % 3
Will show this output:
2
Exponentiation
Exponential calculations are also possible: