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)
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

No comments:
Post a Comment