Loading...
Python

Arithmetic Operators

Arithmetic Operators are the operators which perform arithmetic operations like,

+==>Addition
-==>Subtraction
*==>Multiplication
/==>Division
%==>Modulo
//==>Floor Division Operator
**==>Exponent Or Power Operator

Example:

a=20
b=4
print(‘a+b=’,a+b)
print(‘a-b=’,a-b)
print(‘a*b=’,a*b)
print(‘a/b=’,a/b)
print(‘a//b=’,a//b)
print(‘a%b=’,a%b)
print(‘a**b=’,a**b)

Output:

a+b=24
a-b=16
a*b=80
a/b=5.0
a//b=5
a%b=0
a**b=160000

Leave a Reply

Your email address will not be published. Required fields are marked *