CJCoding With Joseph
15free / daySign inCreate account

Average From A CSV

The write step stores a header line name,score and three rows in scores.csv, using the three scores read from input. The read-back with csv.DictReader is set up; inside the loop add int(row["score"]) to total and 1 to count, then after the loop print Average: <value> with two decimals (:.2f). Input: three lines, each a whole-number score, no prompt. Import only csv.

Expected Output:

Average: 80.00

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

Hints3 available
Topics:
FilesCSV
📥 Auto-Input:
80\n90\n70\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.