Hard
Gradebook
Write
class Gradebook with add(name, mark) (a student can have many marks), average(name), top() (best average; the earliest added on a tie) and class_average() (average of all marks). Read n lines name mark and print top student with their average, then the class average (both 2 decimals).Input
n, then n lines.
Output
Two lines.
Sample 1
Input
4 Mim 80 Rafi 90 Mim 100 Rafi 70
Output
Mim 90.00 85.00
Sample 2
Input
1 A 50
Output
A 50.00 50.00
Output appears here