I have a calculator script, and I have a variable for the operator, number 1 and number 2, this is what it looks like
Operator = input(“operator: “)
Num1 = input(“num1 here: “)
Num2 = input(“num2 here: “)
If Operator == “x” or “*”:
#code
I have one of these for all four main math equations but it’s goes through all the ifs and elifs in order even if the ‘operator’ input doesn’t match. Note I have pyttsx3 installed and a text to speech is in the code. Any help would be appreciated.