LearnPy Hub
← Dictionaries problems
Medium

Average per Subject

Read lines of student subject mark until END. Print the average mark of each subject (alphabetical) with 1 decimal, using a dictionary of lists.

Input

Lines, then END.

Output

Lines.

Sample 1

Input
Mim math 80
Rafi math 70
Mim bangla 90
END
Output
bangla 90.0
math 75.0

Sample 2

Input
A x 1
END
Output
x 1.0
solution.py
Output appears here
Average per Subject · Python practice problem · LearnPy Hub