Create an algorithm to display the letter grade in a course

Create an algorithm to display the letter grade in a course. A course grade is typically reported as a real number with values from 0 to 100. Your algorithm should ask the user to provide a grade in numerical form and display the letter grade corresponding to a numerical grade if the entered value is between 0 and 100 inclusive. If the value is outside this range, ask the user to enter the value again.

Typical range of grades:

A:90<= grade

B:80<= grade <90

C:70<= grade <80

D:60<= grade <70

F: grade<60

Solution

Here is the algorithm for you:

Algorithm: LetterGrade()
Prompt: \"Provide a grade in numerical form in the range 0 - 100: \"
Read numberGrade;
while(numberGrade < 0 or numberGrade > 100):
Prompt: \"Provide a grade in numerical form in the range 0 - 100: \"
Read numberGrade;
if numberGrade >= 90:
return \'A\';
else if numberGrade >= 80:
return \'B\';
else if numberGrade >= 70:
return \'C\';
else if numberGrade >= 60:
return \'D\';
else
return \'F\'   

Create an algorithm to display the letter grade in a course. A course grade is typically reported as a real number with values from 0 to 100. Your algorithm sho

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site