# Menu Driven calculator.
import math
print("ENTER NUMBERS")
a=input("ENTER INTEGER:")
b=input("ENTER INTEGER:")
a=int(a)
b=int(b)
print("for ADDITION:+")
print("for SUBTRACTION: -")
print("for MULTIPLICATION: *")
print("for DIVISION: /")
print("for SQRT: s")
print("for FACTORIAL: f")
print("for EXPONENT:x")
def add(x,y):
print("ADDITION of",x," and ",y,"is",x+y)
def subt(x,y):
if x>y:
print("SUBTRACTION of",x," and ",y,"is",x-y)
else:
print("SUBTRACTION of",y," and ",x,"is",y-x)
def mul(x,y):
print("MULTIPLICATION of",x," and ",y,"is",x*y)
def div(x,y):
print("DIVISION of",x," and ",y,"is",x/y)
while True:
opt=input("PLEASE CHOOSE ANY BELOW OPERATION ")
if opt =='+':
add(a,b)
elif opt =='-':
sub(a,b)
elif opt =='*':
mul(a,b)
elif opt=='/':
div(a,b)
elif opt =='s':
print(math.sqrt(a))
print(math.sqrt(b))
elif opt =='f':
print(math.factorial(a))
print(b,math.factorial(b))
elif opt =='x':
print(math.exp(a))
print(math.exp(b))
elif opt=="r":
if a!=b:
print("a and be are not equal")
else:
print("a and be are equal")
else:
print("Please choose correct option....")