Skip to main content
A-LevelComputer ScienceProgramming9618/22 · Oct/Nov 2022 · Q211 Marks

2 (a) An algorithm will process data from a test taken by a group of students. The algorithm will prompt and input the name and test mark for each of the 35 students. The algorithm will add the names of all the students with a test mark of less than 20 to an existing text file Support_List.txt,which already contains data from other group tests.

  1. (a)(i)Describe the steps that the algorithm should perform. Do not include pseudocode statements in your answer.[5]
  2. (a)(ii)Explain why it may be better to store the names of the students in a file rather than in an array.[1]
  3. (a)(iii)Explain why WRITE mode cannot be used in the answer to part 2(a)(i).[1]
  4. (b)Examine the following state-transition diagram. START S1 Input-A | Output-X Input-B S4 S2 Input-B Output-W Input-A Input-A Input-B S3 Input-A | Output-W Complete the table to show the inputs, outputs and next states. Input Output Next state S1 Input-A Output-W Output-W[4]

This question uses a diagram from the original paper, which isn't shown here. Open the full paper from the past papers archive to see it.

Mark scheme

Marking points from the official mark scheme (Oct/Nov 2022). The mark or mark type is shown in brackets.

  1. [5] (a)(i) One mark per step (or equivalent): 1 Open file in APPEND mode (and subsequent Close) 2 Prompt and Input a student name and mark 3 If mark greater than or equal to 20 jump to step 5 4 Write only the name to the file 5 Repeat from Step 2 for 35 times / the number of students
  2. [1] (a)(ii) Data in a file is saved after the computer is switched off / stored permanently // no need to re-enter the data when the program is re-run
  3. [1] (a)(iii) Example answer: So that existing file data is not overwritten.
  4. [4] (b) One mark per row (row 2 to 5): Input Output Next state S1 Input-A Output-X S2 Input-A (none) S2 Input-B Output-W S3 Input-A Output-W S4

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 →

About this question

Topic
Programming, A-Level Computer Science (syllabus 9618). Structured question, 11 marks.
Source
A-Level Computer Science, Oct/Nov 2022 Paper 2 Variant 2, question 2.

Questions and mark schemes are from past examination papers and remain the copyright of the exam board. How Oracle Prep builds its content

Related Computer Science questions

© 2026 Oracle Prep