[Solved] Simply use variables throughout functions


That’s because although you call the function you don’t save its return value anywhere. Try instead

def main():
    price = equation(5, 10)
    print(price)

Note also that the variable in the calling function doesn’t need to relate to naes inside the called function (which are generally only available inside the function). So you could equally well write

def main():
    some_other_name = equation(5, 10)
    print(some_other_name)

solved Simply use variables throughout functions