Average quiz scores
Your task
A gradebook export lists one quiz result per row as "student,score", where score is a non-negative integer; a student may appear on several rows. Return a dictionary mapping each student to the floor of their average score. For example, ["mia,90", "mia,95", "leo,80"] gives {"mia": 92, "leo": 80} because floor(185/2) = 92.
Examples
average_score(rows: list[str]) -> dict[str,int]Example 1
Input
average_score(["mia,90", "mia,95", "leo,80"])Output
{"mia": 92, "leo": 80}