Python Tutorials · Python Operators

Arithmetic Operators

Learn all about Arithmetic Operators in this comprehensive tutorial.

5 min read beginner
  • Arithmetic operators are used with numeric values to perform common mathematical operations:
  • Here is an example using different arithmetic operators:
  • Python has two division operators:

Arithmetic Operators

Arithmetic operators are used with numeric values to perform common mathematical operations:

OperatorNameExampleTry it
+Additionx + yTry it »
-Subtractionx - yTry it »
*Multiplicationx * yTry it »
/Divisionx / yTry it »
%Modulusx % yTry it »
**Exponentiationx ** yTry it »
//Floor divisionx // yTry it »

Examples

Here is an example using different arithmetic operators:

python

Division in Python

Python has two division operators:

  • **/** - Division (returns a float)
  • **//** - Floor division (returns an integer)
python
python

Module quiz

2 questions
1

Which of the following is true about Arithmetic Operators?

2

What is the most common pitfall when working with Arithmetic Operators?

Answer all questions to submit.