211k views
0 votes
Which would be the best name for a function that takes the time of day and returns the numbers of coffee sold at a coffee shop? Answer choices: Coffee(time) Time(coffee) Day(time) Time(shops)

1 Answer

3 votes

Answer:

Coffee(time)

Explanation:

A function's output variable will be:

output(input)

So we need to find the input variable and the output variable.

We know that when the time of day changes, we get a certain amount of coffee sold. This means that the amount of coffee sold is directly influenced by the time of day.

The time of day then becomes our input as the coffee sold relies on that number.

That leaves coffee sold as our output!

So the best name for a function in this scenario is Coffee(time).

Hope this helped!

User Anil Meena
by
4.4k points