Problem

Develop an M-file function that is passed a numeric grade from 0 to 100 and returns a lett...

Develop an M-file function that is passed a numeric grade from 0 to 100 and returns a letter grade according to the scheme:

Letter

Criteria

A

90 ≤ numeric grade ≤ 100

B

80 ≤ numeric grade<90

C

70 ≤ numeric grade<80

D

60 ≤ numeric grade<70

F

numeric grade<60

The first line of the function should be

function grade = lettergrade(score)

Design the function so that it displays an error message and terminates in the event that the user enters a value of score that is less than zero or greater than 100. Test your function with 89.9999, 90, 45 and 120.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 3