a. Prompt the user to enter a numeric score.
b. Read the score. Note that fractional inputs (like 95.7) are possible
c. If the score entered is not valid, print an error message, do not assign a grade, and do not output a grade
d. Otherwise, assign a letter grade to a variable based on the grading criteria below
e. Output the letter grade
80 up to but less than 90 B
70 up to but less than 80 C
60 up to but less than 70 D
less than 60 F
less than 0 or greater than 100 invalid score
I am not looking for any free code just want to make sure I have completed my task and that this code is well written.
//Main Module //Written by A. Pseftis 08/30/2013 //The Main Module first declares all the variables used within the program. Then it gives the //welcome message and name of the program. Next it gives a description of what the function of //this program is. Lastly it calls all the sub modules to be executed in the order they are listed. // Main Module Declare Score As Float Declare Grade As Character Write “Welcome to the score to grade converter” Write Write “This program will take the number value of a score and convert it to it’s Write “letter value and displays that value for the user.” Write Call Input Data module Call Process module Call Results module End Program //Input Module //Written by A. Pseftis 08/30/2013 //Prompts the user to enter the number value of the score they want converted. // Input Data module Write “Please enter the score.” Input Score End Input module //Process module //Written by A. Pseftis 08/30/2013 //Takes the number value from the input module and converts it into the corresponding //letter value. // Process module Set Score = Grade IF ((Score > 90) AND (Score <= 100)) THEN Write “grade:”= 'A' If Else ((Score >= 80) AND (Score <= 90)) THEN Write “grade:”= 'B' If Else ((Score >= 70) AND (Score <= 80)) THEN Write “grade:”= 'C' If Else ((Score >= 60) AND (Score <= 70)) THEN Write “grade:”= 'D' If Else ((Score <=60) THEN Write “grade:”= grade: = 'F' If Else ((Score < 0) AND (Score >100)) THEN Write “grade:”= “invalid score” End If End Process module //Output Results module //Written by A. Pseftis 08/30/2013 //Outputs the letter value that was converted from the input score or give the invalid score //message if the input was invalid. Output Results module Write “A” +Grade Write “B” +Grade Write “C” +Grade Write “D” +Grade Write “F” +Grade Write “invalid score” +Grade End Output module