The provided code stub will read in a dictionary containing key/value pairs of name:[marks] for a list of students. Print the average of the marks array for the student name provided, showing 2 places after the decimal.
- 'alpha':[20,30,40]
- 'beta':[30,50,70] The query_name is 'beta'. beta's average score is (30+50+70)/3=50.0
The first line contains the integer n
, the number of students' records. The next n
lines contain the names and marks obtained by a student, each value separated by a space. The final line contains
2 <= n <= 10
0 <= marks i < 100
length of marks arrays = 3
3
Krishna 67 68 69
Arjun 70 98 63
Malika 52 56 60
Malika
56.00
Marks for Malika are {52, 56, 60} whose average is (52+56+60)/3 => 56
2
Harsh 25 26.5 28
Anurag 26 28 30
Harsh
26.50