Objective
Create a Python program that calculates the average grade of each student when the same student can have several grades.
Instructions
- Read an integer
nand thennlines with the formatname grade(the grade is an integer). - Store in a dictionary, for each name, the list of their grades.
- Show one line per student, sorted alphabetically, with the format
name: averageand the average with two decimals.
5
ana 8
luis 6
ana 10
eva 7
luis 7
ana: 9.00
eva: 7.00
luis: 6.50
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise