def calculate(action, a, b):
    """ 
    Calculate the result of the action and the two numbers.
    """

    print(f'{action}ing a = {a} and b = {b}')

    if action == 'add':
        return a + b
    elif action == 'subtract':
        return a - b
    elif action == 'multiply':
        return a * b
    elif action == 'divide':
        return a / b