What happens is that when I use the functions like sum()
Python says me that it doesn't exist. Because it's trying to send a numeric result instead of the formula, as I want. Somebody knows any way to make it work??
def calculator(action, formula):
print('I need two numberst to {} them'.format(accion))
a = int( input('Enter the first term'))
b = int( input('Enter the second term'))
def sum():
calculator('add', a+b)
def substraccion():
calculator('substract', a-b)
def multimplication():
calculator('multiply', a*b)
def division():
calculator('divide', a/b)
# --- MAIN --- #
sum()