CJCoding With Joseph
15free / daySign inCreate account

Student Report From Input

Build a dict of dicts from the input and report on it. Input: the first line is a whole number n; then for each of the n students come four lines, a name and then three grades as decimal numbers; read everything with a bare input(), no prompts, using range(n) for the students. Store each student as an inner dict with the key grades holding the three grades as a list, under the name in the outer dict. Then print one line per student in input order in the form <name>: <average> with the average of their grades to two decimals, computed with sum and len, and finally the line Top: <name> for the student with the highest average, found with a loop and no max.

Expected Output:

maya: 85.00
omar: 65.00
Top: maya

= newline. The output ends with a newline — print one after the last line.

Hints4 available
Topics:
Dictionaries
📥 Auto-Input:
2\nmaya\n88\n92\n75\nomar\n60\n70\n65\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.