You will write functions that find a class mark and the mean of a grouped table by the direct method. Then you will find which class contributes most to the total.
The idea. The class mark is half the sum of the two ends of the class. The mean is , with the class mark.
Your tasks.
class_mark, return the middle of the class from lower to upper.grouped_mean, return the mean of the table, rounded to decimals. The classes start at the values in lowers and all have the width width.biggest to the lower end of the class with the largest product .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…