Arithematic Operation in Python - Learn Engineering

All the news and updates relevant to Engineering. You can also Write a post here

Breaking

Thursday, June 4, 2020

Arithematic Operation in Python


Question:

Arithematic Operation using Python Programming:

Program:



a=int(input("a="))
b=int(input("b="))
c=a+b
print("Sum of a and b",c)
c=a-b
print("Difference of a and b",c)
c=a*b
print("Product of a and b",c)
c=a/b
print("Quotient of a and b",c)
c=a%b
print("Remainder of a and b",c)
c=a**b
print("Power of b is",c)

Output:

 =========
a=2
b=3

Sum of a and b 5
Difference of a and b -1
Product of a and b 6
Quotient of a and b 0.6666666666666666
Remainder of a and b 2
Power of b is 8

Follow Us For More...

No comments:

Post a Comment