The variables Name, Age and Found are used in a computer program. Name holds the name of a person. Age holds the age of a person as a whole number. Found holds a flag that can be set to TRUE or FALSE
- (a)Write pseudocode statements to declare the variables Name, Age and Found[3]
- (b)(i)The procedure StoreData(Name) stores the name of a person in the file People.txt. Write pseudocode statements to: • define the procedure with the parameter • store the name of the person in the file.[5]
- (b)(ii)Write the pseudocode that uses the procedure StoreData() to store the name 'Suella' in the file People.txt[2]
Mark scheme
Marking points from the official mark scheme (Oct/Nov 2025). The mark or mark type is shown in brackets.
- [1] (a) DECLARE Name : STRING
- [1] (a) DECLARE Age : INTEGER
- [1] (a) DECLARE Found : BOOLEAN
- [1] (b)(i) using PROCEDURE StoreData and ENDPROCEDURE
- [1] (b)(i) defining the parameter correctly
- [1] (b)(i) correctly opening the file for write
- [1] (b)(i) correctly storing the name
- [1] (b)(i) correctly closing the file
- (b)(i) Example: PROCEDURE StoreData (Name : STRING); OPENFILE People.txt FOR WRITE; WRITEFILE People.txt, Name; CLOSEFILE People.txt; ENDPROCEDURE
- [1] (b)(ii) use of call
- [1] (b)(ii) correct procedure call with 'Suella'
- (b)(ii) Example: CALL StoreData("Suella")
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →