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

i need help with running the program here\'s my code clc clear all load grades2.

ID: 3581166 • Letter: I

Question

i need help with running the program here's my code

clc
clear all

load grades2.txt
% quizz=grades2(:,2);
% exam1=grades2(:,3);
% exam2=grades2(:,4);
% exam3=grades2(:,5);

%clc
finalA=@(quizz,exam1,exam2,exam3)(90-quizz*.10-exam1*.20-exam2*.20-exam3*.20)/.30;
finalB=@(quizz,exam1,exam2,exam3)(80-quizz*.10-exam1*.20-exam2*.20-exam3*.20)/.30;
finalC=@(quizz,exam1,exam2,exam3)(70-quizz*.10-exam1*.20-exam2*.20-exam3*.20)/.30;
finalD=@(quizz,exam1,exam2,exam3)(60-quizz*.10-exam1*.20-exam2*.20-exam3*.20)/.30;

quizz=grades2(:,2);
exam1=grades2(:,3);
exam2=grades2(:,4);
exam3=grades2(:,5);

grades=menu('Select','A','B','C','D')

switch grades
case 1
finalA
case 2
finalB
case 3
finalC
case 4
finalD
end

4. The file grades2.txt contains the following grade information for 10 class average, exam 1, exam 2, exam 3. You are to create a script that will allow the instructor of the to determine what each student needs to make on the final exam to get an A, B. C, or Din the course. The grading rubric is as follows: Quiz 10%, Exam 1 120%), Exam 2 (20% Exam 3020% and Final Exam (30%). For example, you would use the following equations to determine the final exam grades needed for an A, B, C, D in the class final exam A (90 quiz ..10 exam 1. exam2..20 exam3 .20)/.30 final exam B (80 quiz ..10 exam1 .20 2 .20 exam 3 .20)/.30 final exam C Co quiz *.10 exami 20 exam2 20 exam3 a .20) 30 final exam D (60 quiz .10 exami .20 exam2..20 exam3 ..20)/.30 To accomplish this your script should: Load grades2.txt equations above C, or D Create anonymous functions for the between A, B, be used display how Use the menu function to prompt the user to select to script should Use switch case to determine which anonymous function needs the grade exam rades a calculated for each student, Once the needed final desired grade Ge, the many students will not make the

Explanation / Answer

To dislpay how many students would not make the desired grade, add one if condition at the end of the code:

ctr = 0;

if finalA < 100
   ctr++;

if finalB < 100
   ctr++;

if finalC < 100
   ctr++;

if finalD < 100
   ctr++;

print("%s number of students will not get required grade, ctr);