Faulty calculator(if,elif)-5

 


def plus(a,c):
print("result",a+c)
def minus(a,c):
print("result",a-c)
def gun(a,c):
print("result",a*c)
def vag(a,c):
print("result",a/c)




a=int(input("give 1st number "))
b=input("give operatot ")
c=int(input("give 2nd number "))




if(a==45 and b=="*" and c==3):
print("result 555")
elif(a==56 and b=="+" and c==9):
print("result 77")
elif(a==56 and b=="/" and c==6):
print("result 4")

elif(b=="+"):
plus(a,c)
elif(b=="-"):
minus(a,c)
elif(b=="*"):
gun(a,c)
elif(b=="/"):
vag(a,c)

Comments

Popular posts from this blog

D WEB LINK