Simple Calculation Program
I have got this program: while True: print("Options:") print("Enter 'add' to add two numbers") print("Enter 'subtract' to subtract two numbers") print("Enter 'multiply' to multiply two numbers") print("Enter 'divide' to divide two numbers") print("Enter 'quit' to end the program") user_input = input(":") if user_input == "quit": break elif user_input == "add": num1 = float(input("Enter a number: ")) num2 = float(input("Enter another number: ")) result = str(num1 + num2) print("The answer is " + result) else: print("Unknown input") When I run the following Programm in the Terminal, I get it to run only if the user enters the word add between '' as this: 'add' is there anway to change the program, so that the user get to input only the word as it is without "" or '' and still get it to run without erors? Here is the eror message that I get each time I enter the word add without ' '. Traceback (most recent call last): File "ifelse.py", line 21, in <module> user_input = input(":") File "<string>", line 1, in <module> NameError: name 'add' is not defined