Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 statementsimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Explain the possibilities of a Web 3.0 environment.

Answered: 1 week ago

Question

Writing a Strong Introduction

Answered: 1 week ago