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

Question:

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

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.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: