Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is how the question is presented in MATLAB: Fill in theblank lines Switch case can be used with numerical range argument, e.g.x <100, when

This is how the question is presented in MATLAB: Fill in theblank lines

Switch case can be used with numerical range argument, e.g.x<100, when you start the function or script with

switch true

A script is being written with a function at the bottom. Fill inthe blanks.

SCRIPT:

quiz = input('Please enter a score between 0 to 50!');

grade=switchletgrade(quiz);

while quiz < 0 || quiz > 50

quiz = input('Your number is invalid! Please enter a scorebetween 0 to 50');

___________________

end

fprintf('The score that you entered received grade %s',grade)

FUNCTION:

function grade = switchletgrade(quiz)

switch true

case quiz>=45

grade = 'A';

case quiz<45&& quiz>=40

grade = 'B';

_________________

grade = 'C';

case quiz<35&& quiz>=30

grade = 'D';

_____________________

grade = 'F';

end

end

____________________________

___________________________________________________________________________

Step by Step Solution

3.37 Rating (147 Votes )

There are 3 Steps involved in it

Step: 1

The Complete Matlab code for the problem quiz inputPlease enter a scor... 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

Marketing Strategy

Authors: O. C. Ferrell, Michael Hartline

6th edition

1285073045, 978-1285607139, 1285607139, 978-1285677316, 978-1285073040

More Books

Students also viewed these Programming questions

Question

$250 is what percent less than $750?

Answered: 1 week ago

Question

How much is $102 after a decrease of 2%?

Answered: 1 week ago

Question

How much is $150 after an increase of 150%?

Answered: 1 week ago