Note AcademyNote Academy

Computer Science · Oct / Nov 2025 · Paper 21 · Question 9

0478

As printed in the paper

The question as text

A school stores all the students’ attendance data in a file called ­´º¿žºµ´åæ Write an algorithm in pseudocode to read a line of text from the file and store this line in the variable {¹¿´º­´º¿žºµ´ [4]

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme

One mark per bullet point

correctly opening Attendance.txt for read
use of READFILE
… and storing in StudentAttendance
closing Attendance.txt

Example

OPENFILE Attendance.txt FOR READ

READFILE Attendance.txt, StudentAttendance

CLOSEFILE Attendance.txt

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.