what is wrong with my user_input line? practice calc
while True: print ("options:") print ("Enter 'add' to add two numbers:") print ("Enter 'sub' to subtract two numbers:") print ("Enter 'mult' to multiply two numbers:") print ("Enter 'div' to divide two numbers:") print ("Enter 'quit' to end program:") user_input = input(":") if user_input == "quit": break elif user_input == "add": num1 = (float("Enter a number:")) num2 = (float("Enter the second number:")) result = str(num1 + num2) print ("The answer is" + result) elif user_input == "sub": num1 = (float("Enter a number:")) num2 = (float("Enter the second number:")) result = str(num1 - num2) print("The answer is" + result) elif user_input == "mult": num1 = (float("Enter a number:")) num2 = (float("Enter the second number:")) result = str(num1 * num2) print("The answer is" + result) elif user_input == "div": num1 = (float("Enter a number:")) num2 = (float("Enter the second number:")) result = str(num1 / num2) print("The answer is" + result) line 8 user_input = input(":") is giving me grief in code playground