Question 4 for assignment 1 has us finding the minimum and maximum values in a list, no problems there, but it also states:
"If the list contains more than n elements, an error message ‘list is too long’ should be displayed."
Now, there is no reference to this "n" anywhere else, so for me it can only be another parameter. That is, the form will be something like:
find_min_and_max(L, Min, Max, N)
with L being the list, Min the minimum, Max the maximum, and N the value for "n".
This extra parameter just doesn't feel right to me. It seems a clumsy, contrived addition just to have a value for "n".
So, I feel there must be something missing here, something that makes the value of "n" more meaningful.
Any thoughts on this? I'm going with this for now, but I would really like to change it, if somebody could come up with a better idea. Thanks for your time.