Problem 1:Input names of students from the user, terminated by ZZZ, andcreate a data file GRADES with records of the form:student (string), test1 (integer), test2 (integer), test3 (integer)In this file, all test scores should be set equal to 0. Main Program
Open GRADES
Declare Name as String
Call Write Grades Module
Close GRADES
End Main Module
Write Grades Module
Display “Enter Student’s Name, ZZZ to quit”
Input Name
While Name “ZZZ”
Write Name to GRADES
Write “0 0 0” to GRADES
Write newline to GRADES
Input Name
End WhileEnd Write Grades Module
Problem 2:Display the contents of the file GRADES created in Problem 1.Each student’s record should appear on a separate line and includethe total score (the sum of the three tests) for that student. Forexample, a line of output might be:R. Abrams 76 84 82 242 Main Program
Declare Score1, Score2, Score3 as Integers
Declare Name as String
Open GRADES
Call Display Grades Module
Close GRADES
End Main Module
Display Grades Module
Read Name from GRADES
Read Score1 from GRADES
Read Score2 from GRADES
Read Score3 from GRADES
Declare Sum as Integer
Sum = Score1+Score2+Score3
Display Name, Score1, Score2, Score3, Sum
Write newline
End Display Grades Module