You are on page 1of 1

# program for calculation

Sum=a+b
return Sum
def Subtract(a,b):
di erence=a-b
return di erence
def Multiply(a,b):
product=a*b
return product
def Divide(a,b):
quotient=a/b
return quotient
def squ(a):
sqre=a**2
return sqre
def sqrot(a):
sqroot= math.sqrt(a)
return sqroot

n1=int(input("Enter the value"))


n2=int(input("Enter the value"))
print("For add press 1","For subtract press 2","For multiply press 3","For divide press 4","For
square press 5","For square root press 6")
a=int(input("Enter what you want to do:-"))

if a==1:
print("Sum of the numbers",Add(n1,n2))
elif a==2:
print("di erence of the numbers",Subtract(n1,n2))
elif a==3:
print("product of the numbers",Multiply(n1,n2))
elif a==4:
print("Dividing of the numbers",Divide(n1,n2))
elif a==5:
print("Finding the Square",n1**2)
elif a==6:
print("The square root of the number is:-",sqrot(n1))
else:
print("invalid choice”)
ff
ff
ff

You might also like