LearnPy Hub
← File Handling problems
Hard

Grade Report

Read rows name,m1,m2,m3 until END into in.csv. Write report.csv with columns name,total,grade (grade A if total ≥ 240, B if ≥ 180, else C). Print report.csv.

Input

Rows, then END.

Output

The report CSV.

Sample 1

Input
Mim,90,85,80
Rafi,60,60,59
END
Output
name,total,grade
Mim,255,A
Rafi,179,C

Sample 2

Input
A,100,100,100
END
Output
name,total,grade
A,300,A
solution.py
Output appears here
Grade Report · Python practice problem · LearnPy Hub