Test 2 Part 2: (75 points)
This program will process grades for the group of students. The program will ask user to enter the number of students in the
group, and the number of courses each student takes in specific semester. Assume, that all students take the same number of
courses.
The program will ask user to enter final grade for each course for each student.
All grades will be stored in 2-D list. One row of 2-D list stores grades for one student.
For example, if there are 3 students in the group and each student takes 2 courses, and the input grades are:
90 67 for first student, 99 56 for second student, and 78 67 for third student, the 2-D list of grades will be as follows:
90 67
99 56
78 67
ASSUME THAT INPUT IS VALID. NO NEED TO CHECK VALIDITY OF THE INPUT.
Write the following functions:
- (5 points) def make_2d_list(row, col) - creates 2-d list of grades from user input and returns the list
- (15 points) def ave(list, row, col) - finds and returns the average of all grades for all students in the
group
- (20 points) dev max(list, row, col) - fnds and returns the maximal grade among all grades for all students, and
the position of the max grade in the 2-d list (i and j). (in case there are more than one appearance of max value,
return only one instance of i and j)
- (15 points) def ave_student(list, row, col) - that finds and returns the ONE dimensional list of averages PER
student.
For the grades in the example above, we have 3 students (3 rows). The function finds the average of numbers in each row and
creates a one-dimensional list to store these averages. This function returs the following one dimensional list [78.5, 77.5,
72.5]
- (20 points) main function that inputs number of students in the group and number of courses,
creates a 2-d list of grades, finds the average grade for all students in the group, finds
the maximal grade among all students in the group and its position, finds the list of averages per student,
finds the STUDENT index who got a highest average
(If there are several students(courses) with the same highest average, you only need to find ONE index). Use
appropriate function for each task