58,116 views
31 votes
31 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 Userx
by
3.6k points

1 Answer

20 votes
20 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 CrimsonX
by
2.8k points