Python Arithmetic Operators

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:

Subtraction

Subtract a value:

Multiplication

We can also multiply two values:

Division

Or do a division:

Modulus

We can also calculate the remainder of a division:

Exponentiation

Exponential calculations are also possible:

Floor Division

The floor division returns a result rounded down to the closest integer:

Conclusion

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!


Ask a question or start a discussion by visiting our Community Forum