Someone help me fast pleaseeee!!!!

You go to a vending machine, put 1 in press and you get a kitkat bar. You go the next day to the same vending machine. You put $1 in, press G5and you get a snicker bar. You go the three days later to the same vending machineput in 1.25and you get a different size snicker bar. Is this an example of a function?