grade_summary(scores) returning a dict with mean, median, and mode of a non-empty list of integers, using the statistics module (round the mean to 2 decimals). No hand-rolled math.grade_summary([80, 90, 90, 70])
{'mean': 82.5, 'median': 85.0, 'mode': 90}Library functions compute all three.
import statistics.
median of an even-length list averages the middle pair.