How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Christopher Your Own Question

Christopher
Christopher, B. Eng in Computer Engineering
Category: Programming
Satisfied Customers: 22
Experience:  Computer Engineering degree holder with a ton of programming and computer troubleshooting experience
29149269
Type Your Programming Question Here...
Christopher is online now
A new question is answered every 9 seconds

I have written a pseudocode program on grades and need someone

This answer was rated:

I have written a pseudocode program on grades and need someone to correct it
hi, could you post your pseudocode please?

Edited by Christopher on 2/6/2010 at 10:27 PM EST
Customer: replied 6 years ago.
  • 1. Input names of students from the user, terminated by ZZZ, and create a data file GRADES with records of the form:

 

Student (string), test1 (integer), test2 (integer), test3(interger)

In this file, all test scores should be set equal to 0

 

  • 2. Display the contents of the file GRADES created in Problem 1.

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."

Write "Enter 0 for both when done."

Input Student, Score

End While

Close GradeFile

 

Open "GRADES" For Input as GradeFile

While Not EOF(GradeFile)

Read GradeFile, Name, Score

Write Name, " ", Score

End While

Close GradeFile

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.

 

Open "GRADES" For Output As GradeFile

Write "Enter the student's name".

Input Student

test1 = 0

test2 = 0

test3 = 0

Write GradeFile, Student, test1, test2, test3

While Student <> "ZZZ"

Write "Enter the student's name".

Input Student

Write GradeFile, Student, test1, test2, test3

End While

Close GradeFile

 

Open "GRADES" For Input as GradeFile

While Not EOF(GradeFile)

Read GradeFile, Name, Score1, Score2, Score3

Score = Score1 + Score2 + Score3

Write Name, " ", Score1 , " ", Score2, " " , Score3, " ", Score

End While

Close GradeFile

Christopher and 3 other Programming Specialists are ready to help you