0

calculator doesn't work

#simple calculator #divide is ÷ not \ x = input() y = input(" ") z = input() if y == ("+"): a = int(x) + int(z) print (x + "+" + z + "=" + str(a)) elif y == ("-"): b = int(x) - int(z) print (x + "-" + z + "=" + str(b)) elif y == ("÷"): c = int(x) / int(z) print(x + "÷" + z + "=" + str(c)) why is the last elif statemen no output

14th Aug 2016, 1:38 AM
yunus0266
1 Antwort
0
no elif needed else enough else: print("Invalid operation")
24th Sep 2016, 9:59 AM
மனோஜ்குமார் பழனிச்சாமி
மனோஜ்குமார் பழனிச்சாமி - avatar