Arithmetic Operators in Python

In all programming languages you will find arithmetic operators. Arithmetic operators are used with numeric values to perform common mathematical operations. In this tutorial I will show you the arithmetic operators available in Python.

Now, let’s see the arithmetic operators in Python:

Operator Name Example
+ Addition x + y
Subtraction x – y
* Multiplication x * y
/ Division x / y
% Modulus x % y
** Exponentiation x ** y
// Floor division x // y

Python Code with arithmetic & assignment operators:

x=5
y=6
z=x+y
print(z)

Output:

11

In this tutorial, I have shown arithmetic operators in Python. Hope you have enjoyed the tutorial. If you want to get updated, like my facebook page http://www.facebook.com/freetechtrainer and stay connected.

Add a Comment