Making a unique Faulty Calculator (Special program) in Python

 SO I AM GOING TO MAKE A FAULTY CALCULATOR BY THE HELP OF IF-ELSE STATEMENTS. IT WILL CALCULATE ALL  THE THING CORRECTLY EXCEPT SOME OF THEM.

"""FAULTY CALCULATOR --: I am going to make a calculator which do all calculations correct except
45+3(it will return 555),56*9(it will return 77) and 56/6( it will return 4)."""

print("Enter the first number\n")
num1=int(input())

print("Enter an operator\n")
op=input()

print("Enter the second number\n")
num2 = int(input())

if op=='+':
if num1==45 and num2==3:
print(555)

else:
print("The sum is:",num1+num2)

elif op=='*':
if num1==56 and num2==9:
print(77)

else:
print("The product is:",num1*num2)

elif op=='/':

if num1==56 and num2==6:

print(4)

else:

print("The division is :",num1/num2)



Comments