Jul-13-2019, 12:31 PM
(Jul-13-2019, 12:24 PM)ichabod801 Wrote: You need to have an expression on each side of the or.if Calcop == 1 or '+':
is equivalent toif (Calcop == 1) or ('+'):
. (see here for details)
Also you are casting your input to an int
Calcop = int(input("What operation do you want?\n1)+\n2)-\n3)x\n4)÷\n5)Mod\n6)Rounding\n7)Ceil\n8)Floor\n"))Since your input can be an it or a string, just leave it as a string and adjust your tests for strings
Calcop = input("What operation do you want?\n1)+\n2)-\n3)x\n4)÷\n5)Mod\n6)Rounding\n7)Ceil\n8)Floor\n") if Calcop == '1' or Calcop == '+':