Skip to content
C

Average Marks by Subject

Mediumpython

Given a DataFrame of student marks across 3 subjects, calculate the class average for each subject.

Why not the chart? the notes visualize this with a Seaborn bar chart, but an automated judge can only grade text output, not a rendered image — this problem tests the underlying data computation (the class average per subject) that would actually feed that chart.

Approach: build a DataFrame with maths/science/english columns, then take the mean of each column.

Input: First line: the number of students n. Next n lines: maths,science,english scores.

Output: Three lines: maths: <avg>, science: <avg>, english: <avg>, each to 2 decimal places.

Input (stdin)

Output

Run your code to see output here...