I made a program of calculator in PYTHON 3, but showing traceback error.
I have made a Simple calculator programing by python 3. But It is showing traceback error. I couldn't find the mistake. Someone please help me out. Here is the code below - while True : print ('Simple Calculator') print ('Options') print ('Enter add for addition') print ('Enter sub for subtract') print ('Enyer mult for multifunction') print ('Enter dev for division') num_1 = float (input ('Enter a number')) num_2 = float (input ('Enter another number')) if user_input == 'add': result = str(num_1 + num_2) print ('Answer: ' + result ) elif user_input == 'sub': result = str(num_1 - num_2) print ('Answer: ' + result ) elif user_input == 'mult': result = str (num_1 * num_2) print('Answer: '+result) elif user_input == 'dev': result = str(num_1 / num_2 ) print ('Answer: '+result) https://code.sololearn.com/cE8d7gvX0hCY/?ref=app