Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

S. An instructor at ME, WSU, would like to calculate the final letter grade for

ID: 3594054 • Letter: S

Question

S. An instructor at ME, WSU, would like to calculate the final letter grade for each student based on the final score (the final score is calculated by total sum of homework, quiz, midterm/final exams). The hw, quiz, and exam data for each student are given in Table below, which are also given as a matrix variable, namely "score". The given names and scores in Table are arbitrarily chosen for the sake of hw problem). The "score( 1,1)-1", ie., the hw#1 score for John. You can download the hw6.mat from the Course Material, hwi7 assignment in BlackBoard, and to load the data, you need to run the Octave/Matlab command as"load hw7.mat" in the command window. The final score can be calculated using the total sum of the homework, quiz, and exams with an equal weight (a full credit will be 100). The letter grade needs to be assigned based on the final score (see the rubric table below). Note that all the work should be done using Octave (or Matlab) commands to receive a full credit (no credit will be given to manual calculations). The script template and expected outcomes in command window are given bel Final Score above 90 between 80-90 between 70-80 between 60-70 below 60 Letter Grade

Explanation / Answer

The script has been completed according to given information and sample output was as desired. Please upvote my answer if you find this useful.

------The script-----

clear all
load hw7.mat

TotalScorePerStudent = sum(score,2);

N_A = 0;
N_B = 0;
N_C = 0;
N_D = 0;
N_F = 0;

[NumStudent, NumAssignment] = size(score);

for i=1:NumStudent
  
if (TotalScorePerStudent(i) >= 90)
LetterGrade = 'A'; N_A = N_A + 1;
elseif (TotalScorePerStudent(i) >= 80)
LetterGrade = 'B'; N_B = N_B + 1;
elseif (TotalScorePerStudent(i) >= 70)
LetterGrade = 'C'; N_C = N_C + 1;
elseif (TotalScorePerStudent(i) >= 60)
LetterGrade = 'D'; N_D = N_D + 1;
else
LetterGrade = 'F'; N_F = N_F + 1;
end
  
fprintf('Letter Grade for Student %d = %s ', i, LetterGrade);
end

fprintf('Head Count for Grade A = %d, B = %d, C = %d, D = %d, F = %d ', N_A, N_B, N_C, N_D, N_F);