183k views
3 votes
Which of the following would be a good name for the function that takes the length of a race and returns the time needed to complete it?

Which of the following would be a good name for the function that takes the length-example-1
User Zedoo
by
4.2k points

1 Answer

4 votes

In general, a function f(x) means that the input is x and the output is f(x) (or simply f).

Therefore, in our case, the input is the length of the race and the outcome is the time.

The better option is Time(length), option A.

User Ghazgkull
by
4.3k points