so basically i am trying to make a piece of coding that asks what the person wants to do. however as you can see if you try my coding whenevr it says what do you want to do, no matter what the answer, it does calculator(). please help me. p.s. i havent yet added the coding for battleships() and tictactoe(). thanks
def calculator(): #returns the result of adding num1 + num2 def add(num1, num2): return num1 + num2 #returns the result of subtracting num1 - num2 def minus(num1, num2): return num1 - num2 #returns the result of mutipliying num1 * num2 def multiply(num1, num2): return num1 * num2 #returns the result of dividing num1 / num2 def divide(num1, num2): return num1 / num2 operation = input("what do you want to do (+,-,*,/): ") if(operation != '+' and operation != '-' and operation != '*' and operation != '/'): #invalid operation print("please enter a vaild operation") calculator() else: num1 = int(input("Enter num1: ")) num2 = int(input("Enter num2: ")) if(operation == '+'): print(add(num1, num2)) whattodo() elif(operation == '-'): print(minus(num1, num2)) whattodo() elif(operation == '*'): print(multiply(num1, num2)) whattodo() else: print(divide(num1, num2)) whattodo() def helloeveryone(): useless = input('Hello, how are you?') myname = input("What is your name? ") print ('Nice to meet you, ' + myname) myage = input("What's your age, " + myname + "?") #finds out name and age def whattodo(): function = input('So what do you want to do? Enter A for calculator, Enter B for Battleships and Enter C for tic tac toe. ') if(function == 'Access secret files'): secretfiles() elif (function == 'a' or 'A'): calculator() elif (function == 'b' or 'B'): battleships() elif (function == 'c' or 'C'): tictactoe() else: print ('no') def secretfiles(): print ('lol') helloeveryone() whattodo()