Python simple calculator not working, anybody can help?
while True: print("Options") print("Enter '+' for addition") print("Enter '-' for subtraction") print("Enter '*' for multiplication") print("Enter '/' for division") print("To exit please enter 'E'") user_input=input(":") if user_input == "E": break elif user_input == "+": num1 = float(input("Enter a number")) num2 = float(input("Enter another number")) result = num1 + num2 print("The answer is " + result) elif user_input == "-": num1 = float(input("Enter a number")) num2 = float(input("Enter another number")) result = num1 - num2 print("The answer is " + result) elif user_input == "*": num1 = float(input("Enter a number")) num2 = float(input("Enter another number")) result = num1 * num2 print("The answer is " + result) elif user_input == "/": num1 = float(input("Enter a number")) num2 = float(input("Enter another number")) result = num1 / num2 print("The answer is " + result) else: print("Unknown input!") anybody can help with my code? i couldnt run it as a calculator.. not sure which part is wrong.. thanks in advanced!!!