adding rows of a file and display in another file

How to add these all ( 1 1 0 1 1 0 1 0 0 0 1 5 8 0 12 10 25) in the script and How to calculate the GPA?? :wall:
For example a course record file can be like this:
COURSE NAME: Operating Systems
CREDITS: 4
123456 1 1 0 1 1 0 1 0 0 0 1 5 8 0 12 10 25
243567 0 1 1 0 1 1 0 1 0 0 0 7 9 12 15 17 15
create a file in the directory which contains the list of all students, their total marks for each course, and their GPA as the last column.
Student# <course name> <course name> <course name> ...
For example a GPA file could be like this:
Student# Operating Systems JAVA C++ Web Programming GPA
123456 76 63 50 82 67.75
243567 80 - 34 63 59

Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.