A football team's goals in 20 matches are in a list. You will find the mode, the mean and the median, and mark all three on a bar chart of the goals. Then you add one freak match with 15 goals and see which averages move.
The idea. The mode is the most common value, the mean is the total over the count, and the median is the middle. An extreme value moves the mean much more than the median.
Your tasks.
mode to the number of goals that appears most often.mean to the total of the goals divided by the number of matches.new_mean and new_median.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…
With Standard, you also open 8 more problems, 3 Python labs and 1 extra course. Everything you have used here stays free, always.