CJCoding With Joseph
15free / daySign inCreate account

Score Statistics

Input: the first line is a whole number n, then n lines each holding a name and a whole-number score separated by one space; no prompts. Write scores.csv with the header name,score and one name,score line per student (read each line with input() inside a for over range(n) and split() it; plain write calls are enough). Read the file back with csv.DictReader, collecting the names and the int scores in two lists with append, and print four lines: Highest: <name> (<score>), Lowest: <name> (<score>), Average: <value> with two decimals (sum divided by len), and Above average: <count>, the number of students whose score is strictly above the average. When scores tie for highest or lowest, the earlier row wins. Import only csv.

Expected Output:

Highest: Omar (92)
Lowest: Lee (75)
Average: 86.75
Above average: 3

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

Hints4 available
Topics:
FilesCSV
📥 Auto-Input:
4\nMaya 88\nOmar 92\nLee 75\nAna 92\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.