The examination committee of the university has decided to give 5 grace marks to every student of a class. Assume that there are list of students in the class and their marks are stored in a list called marksList. Write a program that adds the grace marks to every entry in the marksList.
As the problem deals with a list of marks, we can select a one-dimensional array called ‘marksList’ to represent the list. The grace marks are to be added to all the elements of the list, for which we must use the For-loop. The required program is given below: