0
Finishing up the Calculator
while True: print ("Choose either","*","/","+","-","Q") x = input() if x == "Q": break print ("Closed") elif x in ("*","/","+","-"): a = float(input()) b = float(input()) if x == "*": print ("Results", a * b) if x == "+": print ("Results", a + b) if x == "-": print ("Results", a - b) if x == "/": if b == 0: print ('unable to compute') else: print ("Results" + a / b) Calculator is working but displays are too many did i miss something guy?
1 Antwort
+ 5
your indentation is wrong after "b = input()" and you can't add int to str ( else: print("Results" + a/b) )