18.4k views
4 votes
Does a vending machine represent a function and why?

1 Answer

7 votes
Sure, depending on how the machine is constructed or programmed.

A function can represent any process that takes some input and assigns exactly one output to it. In the case of a simple vending machine, there could one button or sequence of button presses that correspond to the delivery of a certain drink or snack (provided that enough money is fed into the machine first).

A machine that wouldn't qualify as representing a function would be one that consistently offers two or more different drinks.
User Lee Kowalkowski
by
8.2k points