Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this lab, you are going to write a problem that takes the list of scores you created with your sentinel loop, for example: scores

image text in transcribed
image text in transcribed
In this lab, you are going to write a problem that takes the list of scores you created with your sentinel loop, for example: scores - [90, 93, 75, 51, 66, 88, 85); And calculate the number of A, B, C, D, and F grades. A grades are scores that are greater than or equal to 90, B grades are scores that are greater than or equal to 80, C grades are scores that are greater than or equal to 70, D grades are scores that are greater than or equal to 60, and F grades are less than 60. Your code should fill the appropriate variables (see tomments) and print the result to screen: # of As: 2 # of Bs: 2 # of Cs: 1 # of Ds: 1 # of Fs: 1 Function Save C Reset D MATLAB Documentation 1 function (cta, ctb, ctc, ct, ctF] - gradcalc(scores) Xscores is a list of scores, e.g. scores - [90, 93, 75, 51, 66, 88, 85); CtA - []; Xfill this with the number of A grades ctB = []; Xfill this with the number of B grades ctC = []; Xfill this with the number of C grades ctD - []; Xfill this with the number of D grades ctF - []; Xfill this with the number of F grades n - length(scores); rades if 10 XXTODO: Copy and paste your code here (do not define scores, it is provided inthe tests). 12 end Code to call your function C Reset scores - [90, 93, 75, 51, 66, 88, 85); [cta, ctb, ctc, ct, ctF] - gradCalc(scores); 05); Run Function

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Microsoft Outlook 2023

Authors: James Holler

1st Edition

B0BP9P1VWJ, 979-8367217322

More Books

Students also viewed these Databases questions

Question

Show the properties and structure of allotropes of carbon.

Answered: 1 week ago