Final grade function Interface def computeFinalGrades (grades): # Insert your code here return gradesFinal Input argumen
Posted: Sat Nov 27, 2021 2:28 pm
Final grade function Interface def computeFinalGrades (grades): # Insert your code here return gradesFinal Input arguments grades: An N X M matrix containing grades on the 7-step-scale given to N students on M different assignments. gradesFinal: A vector of length n containing the final grade for each of the N students. Output arguments User input No. Screen output No. Description For each student, the final grade must be computed in the following way: 1. If there is only one assignment (M = 1) the final grade is equal to the grade of that assignment. 2. If there are two or more assignments (M > 1) the lowest grade is discarded. The final grade is computed as the mean of M - 1 highest grades rounded to the nearest grade on the scale (using the function roundGrade). 3. Irrespective of the above, if a student has received the grade - 3 in one or more assignments, the final grade must always be -3.