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.
We can add two or more numbers together:
Subtract a value:
We can also multiply two values:
Or do a division:
We can also calculate the remainder of a division:
Exponential calculations are also possible:
The floor division returns a result rounded down to the closest integer:
You have now learned how to do calculations in Python with arithmetic operators:
- Addition: Add two or more numbers together.
- Subtraction: Subtract numbers.
- Multiplication: multiply two or more numbers.
- Division: Divide two numers.
- Modulus: Calculate the remainder of a division.
- Exponentation: Perform a expoentation calculation.
- Floor Division: Returns a result rounded down to the closest integer.
I hope you enjoyed this lesson. If you have any questions feel free to leave a comment!