# Arithmetic operators in python

Arithmetic operators are used for mathematical computations. Arithmetic operators are used with numeric values like integers or float.
Following are the Arithmetic operators in python:

## + operator:

Example:

``````num1 = 10
num2 = 20
total = num1 + num2
print(total)``````

Output:

30

## – operator:

-is subtraction operator. operator is used for subtracting two numbers.

Example:

``````num1 = 10
num2 = 20
total = num2 - num1
print(total)``````

Output:

10

## * operator:

* is multiplication operator. * operator is used for multiplication.

Example:

``````num1 = 10
num2 = 20
total = num1 * num2
print(total)``````

Output:

200

## / operator:

/ is a division operator. / is used for division. It returns result in float.

Example:

``````num1 = 10
num2 = 20
total = num2 / num1
print(total)``````

Output:

2.0

## // operator:

// is a floor division operator. // is used for division. But this operator returns result in integer.

Example:

``````num1 = 10
num2 = 3
total = num1 // num2
print(total)``````

Output:

3

## % operator:

% is a modulus operator. % is a modulus operator which gives remainder of the division.

Example:

``````num1 = 10
num2 = 3
total = num1 % num2
print(total)``````

Output:

1

## ** operator:

** is a exponent operator.

Example:

``````num1 = 10
num2 = 3
total = num1 ** num2
print(total)``````

Output:

1000

## Conclusion:

From this articles you learned different arithmetic operators in python with example. If you have problems while implementing code, you can ask me through the comment section.