Grade Assignment (simple if-elseif-else) 0 solutions submitted (max: 2) Code has already been provided that defines a function named assignGrade that accepts an input variable score that is a scalar and returns an output variable grade. Add commands to determine the corresponding letter grade according to the following grading scale: Score values ranging from 90 to 100 receive an A. Score values ranging from 80 to 89 receive a B. Score values ranging from 70 to 79 receive a C. Score values ranging from 60 to 69 receive a D. Score values ranging from 0 to 59 receive an F. Assign the appropriate letter grade to the character vector output variable grade. Use an if-elseif-else structure in your solution. Note the variable score is defined as an input to the function. Do not overwrite its value in your code. Be sure to assign the appropriate character to the output variable grade. Function 1 function grade = assignGrade(score) 2 %Enter the commands for your function here. end CReset MATLAB Documentation
Added by Rafael H.
Close
Step 1
The function needs to check the score value against different ranges and assign the appropriate letter grade. Show more…
Show all steps
Your feedback will help us improve your experience
Tanvi Garg and 89 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Adi S.
Questions all refer the following graph of position of an object versus time Consider velocity and acceleration to be positive the same direction that is positive. (1pt. ) Find the averge velocity between the points on the graph labeled aud E. (Remember t0 include units!) 9. (1 pL.) Find the anstantanEous velocity the point labeled (1pC What i5 the instantaneous acceleration at the point O the graph Iaheled A? Pasitive Vegative Zero Impossible to tell (1 pL) What is the instAntaneous acceleration at the point Ou the gmph laheled D:
Madhur L.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD