CodeLab Academy 📞 9936 6696
← List Python · Level 9: Functions and dicts Code · 90 points ← #814 #816 →

#815. Average score of students

You get n lines `name score` (one student can have many scores). Print each student's average as `name average` (1 decimal place), with the names in alphabetical order. ### Input n, then n lines. ### Output Lines.

Examples

Input
8
bat 75
bat 81
bat 7
bat 58
anu 33
tuya 63
saraa 70
tuya 66
Output
anu 33.0
bat 55.2
saraa 70.0
tuya 64.5
Input
7
bat 20
bat 16
anu 31
anu 58
tuya 16
anu 67
bat 92
Output
anu 52.0
bat 42.7
tuya 16.0

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!