Skip to main content
A-LevelComputer ScienceAlgorithm design and problem-solving9618/21 · Oct/Nov 2025 · Q49 Marks

A program contains a global 1D array Number consisting of 20 elements of type REAL A procedure Store () will input a sequence of up to 20 real values, one value at a time. These values will be assigned to elements of the array using four steps: Step 1: store the first value in the sequence in the first element of the array Step 2: check each subsequent value input. If this value is larger than the previous value input, then assign the value to the next array element, otherwise go to step 4 Step 3: repeat from step 2 unless the array is full Step 4: output the count of the number of values stored in the array together with a suitable message.

  1. (a)Complete the pseudocode for Store() All variables used in the algorithm must be declared. PROCEDURE Store() ENDPROCEDURE[6]
  2. (b)(i)The requirements of the program change: • the number of values in the sequence is unknown, but may be higher than 20 • the values will need to be accessed by another program as data. The data will be stored in a text file instead of an array. Give two benefits of using a text file instead of an array.[2]
  3. (b)(ii)State any change that will need to be made before each value is written to the file.[1]

Mark scheme

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

  1. [6] (a) Declare local variables Index as integer, ThisNum and LastNum as real
  2. [6] (a) Input value and assign to first element
  3. [6] (a) Attempt at conditional loop including both tests
  4. [6] (a) Completely correct conditional loop including both tests
  5. [6] (a) Assign input value to current element if greater than previous element and input next value in a loop
  6. [6] (a) Final output giving attempted count of elements stored plus message after a loop
  7. [2] (b)(i) The amount of values stored (in a text file) is not fixed / not limited (other than by secondary storage available) // The amount values stored is not limited to the size of the array
  8. [2] (b)(i) The data is stored permanently / non-volatile // Data can be restored / reused without re-entering values
  9. [1] (b)(ii) Each (real) value would have to be converted to a string

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
Algorithm design and problem-solving, A-Level Computer Science (syllabus 9618). Structured question, 9 marks.
Source
A-Level Computer Science, Oct/Nov 2025 Paper 2 Variant 1, question 4.

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