Question: Write a function named calcLtrGrd_XC that accepts eight scores and returns the corresponding letter grade, A through F/N. Here's what the function should return: calcFnlPctg_2('125',

Write a function named calcLtrGrd_XC that accepts eight scores and returns the corresponding letter grade, "A" through "F/N". Here's what the function should return:

calcFnlPctg_2('125', '135', '10', '90', '90', '90', '90', '90') -> 'A'

calcFnlPctg_2('95', '115', '7', '90', '83', '85', '90', '90') -> 'C'

calcFnlPctg_2('115', '140', '10', '75', '100', '90', '87', '93') -> 'B'

This is what I have so far but I dont know what I need to fix with the if statementsWrite a function named calcLtrGrd_XC that accepts eight scores and returns the

Code:

let calcLtrGrd_XC = function (mt, fnl, xc, p1, p2, p3, p4, p5) { mt = Number(mt); fnl = Number(fnl); xc = Number (xc); p1 = Number(p1); p2 = Number(p2); p3 = Number(p3); p4 = Number(p4); p5 = Number(p5);

let finalPercentage = 100 * (((mt + fnl+ xc) / 300) * 0.7 + ((p1 + p2 + p3 + p4 + p5) / 500) * 0.3); if finalPercentage>=90 return "A" if finalPercentage>=80 return "B" if finalPercentage>=70 return "C" if finalPercentage>=67 return "C-/P" if finalPercentage>=60 return "D" if finalPercentage let calcLtrGrd_XC = function (mt, fnl, xc, p1, p2, p3, 24, p5) { mt = Number(mt); fnl = Number(fnl); XC = Number (xc); p1 = Number(p1); p2 = Number(p2); p3 = Number(p3); p4 = Number(p4); p5 = Number(p5); let finalPercentage = 100 * (((mt + fnl+ xc) / 300) * 0.7 + ((p1 + p2 + p3 + 24 + p5) / 500) * 0.3); if finalPercentage>=90 return "A" if finalPercentage>=80 return "B" if finalPercentage>=70 return "C" if finalPercentage>=67 return "C-/P" if finalPercentage>=60 return "D" if finalPercentage

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!