Starting from:

$25

CSE314 - Operating Systems Sessional - Online on Shell Script   - Solved

You need to grade some students based on their obtained marks in some subjects.

 

Input: 

From a file named course.txt, you need to read the subjects to consider.

For each subject (e.g. physics, chemistry, mathematics, etc.), there will be a file named subject.txt (e.g. physics.txt, chemistry.txt, mathematics.txt).

In these files, there will be some lines containing two integers, separated by space. The first integer is the student id(1905***) and the second integer is the marks of that student in that subject.

You need to grade them based on their average marks.

 

Output: 

The output is a .csv file.

 

The header of the .csv file is StudentID, Subject1, Subject2, …., SubjectN, Total Marks, Average marks, and Grade.

Fill out the .csv file accordingly.

 

See the sample IO files for clarification

 

You have only 4 Grades:

 

A
 Average marks >= 80
B
60 <= Average marks < 80
C  
40 <= Average marks < 60
F
Average marks < 40
 

More products