Recent Feedback
I have written a pseudocode program on grades and need someone to correct it
Optional Information: Programming Language: pseudocode
hi, could you post your pseudocode please?Christopher40215.9358237269
Student (string), test1 (integer), test2 (integer), test3(interger)
In this file, all test scores should be set equal to 0
Each student's record should appear on a separate line and include the total score( sum of the three tests) for that student. For example, a line of output might be
R. Abrams 76 84 82 242
Open "GRADES" For Output As GradeFile
Write "Enter the student's name and test score".
Write "Enter 0 for both when done."
Input Student, Score
While Student <> "0"
Write GradeFile, Student,Score
Write "Enter the student's name and test score."
End While
Close GradeFile
Open "GRADES" For Input as GradeFile
While Not EOF(GradeFile)
Read GradeFile, Name, Score
Write Name, " ", Score
Here is the corrected version of your pseudo code. Made a few changes to the while loop condition and removed unecessary input of score since the requirement says to set set scores to 0. Output now gives the scores and total score.
Write "Enter the student's name".
Input Student
test1 = 0
test2 = 0
test3 = 0
Write GradeFile, Student, test1, test2, test3
While Student <> "ZZZ"
Read GradeFile, Name, Score1, Score2, Score3
Score = Score1 + Score2 + Score3
Write Name, " ", Score1 , " ", Score2, " " , Score3, " ", Score
Experience: Computer Engineering degree holder with a ton of programming and computer troubleshooting experience