# Python: Simple calculator (WET to DRY)

Hey guys, i'm wondering if you could help take a look at this code, is there anything i should do to make it more DRY? while True: print("Enter 'add' to add two numbers") print("Enter 'subtract' to subtract two numbers") user_input = input(": ") x = (user_input != ("add" or "subtract")) if x == True: while x: print("Try Again") print("Enter 'add' to add two numbers") print("Enter 'subtract' to subtract two numbers") user_input = input(": ") if user_input == "add": break if user_input == "subtract": break def add_subtract (y): print("what numbers would you like to " + y +" ?") num_1= int(float (input("first number: "))) num_2= int(float (input("second number: "))) if y == "add": print("Your answer is: " + str(num_1 + num_2)) if y == "subtract": print("Your answer is: " + str(num_1 - num_2)) add_subtract (user_input) print("More numbers for me? Yes/No") add_user_input = input(": ") if add_user_input == "No": break if add_user_input == "Yes": continue if add_user_input != "No" and "Yes": while True: print ("Please insert a proper response") print("More numbers for me? Yes/No") add_user_input = input(": ") if add_user_input == "No": break if add_user_input == "Yes": break if add_user_input == "Yes": continue else: break