Home > Blockchain >  if (input == operator): not working in python calculator?
if (input == operator): not working in python calculator?

Time:03-12

print ("THE CALCULATOR")

print ("Type 1st no")

n = input()

print("Type 2nd no")

n2 = input()

print("Which Operator?")

n3 = input()

if (n3 ==  ):

    print("The anwser is", int(n)   int(n2))

enter image description here

also pls dont say that dont paste links i tried to post image but its not working.

please help me!!

CodePudding user response:

Change:-

if (n3 ==  ):

To:-

if (n3 == ' '):
  • Related