You will write the four standard methods without Python's sum(), max() or min(), as the exam expects.
Your tasks.
total(values): return the total of the list.count_over(values, limit): return how many values are greater than limit.highest(values): return the largest value. Start with the first value of the list, so that negative values work.average(values): return the average, using your total function and the number of values.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…