'''
45 * 3 = 555, 56+9 = 77, 56/6 = 4
'''
print("\n\t\t<-*->welcome to my faulty calculator<-*->")
print("\n=>faulty for given below only: \n'45 * 3 = 555, 56+9 = 77, 56/6 = 4' ")
print("=>rest of all are correct operations")
while True:
print("\n\tchoose from ('+','-','*','/')")
o = input("\nplease select a operator ")
if(o=="+" or o=="-" or o=="*" or o=="/"):
a1 = int(input("enter first number: "))
a2 = int(input("enter second number: "))
if o == "+":
if (a1==56 and a2==9):
print(77)
else:
print(a1+a2)
continue
elif o=="-":
print(a1-a2)
continue
elif o=="*":
if (a1==45 and a2== 3):
print(555)
else:
print(a1*a2)
continue
elif o=="/":
if (a1==56 and a2==6):
print(4)
else:
print(a1/a2)
continue
else:
print("invalid input")
break
Comments
Post a Comment