Arithmetic Operation in Python 2 are Given Below:
Addition of Two Numbers in Python
Just Type :
print 2+4
or
a=2
b=4
print a+b
o/p =6
Subtraction of Two Numbers in Python
Just Type :
print 2-4
or
a=2
b=4
print a-b
o/p =-2
Multiplication of Two Numbers in Python
Just Type :
print 2*4
or
a=2
b=4
print a*b
o/p =8
Division of Two Numbers in Python
Just Type :
print 4/2
or
a=4
b=2
print a/b
o/p =0
Finding Remainder in Python
Just Type :
print 3%2
or
a=3
b=2
print a%b
o/p =1
Addition of Two Numbers in Python
Just Type :
print 2+4
or
a=2
b=4
print a+b
o/p =6
Subtraction of Two Numbers in Python
Just Type :
print 2-4
or
a=2
b=4
print a-b
o/p =-2
Multiplication of Two Numbers in Python
Just Type :
print 2*4
or
a=2
b=4
print a*b
o/p =8
Division of Two Numbers in Python
Just Type :
print 4/2
or
a=4
b=2
print a/b
o/p =0
Finding Remainder in Python
Just Type :
print 3%2
or
a=3
b=2
print a%b
o/p =1
Comments :
Post a Comment