Skip to main content
A-LevelComputer ScienceProgramming9618/21 · Oct/Nov 2022 · Q55 Marks

A program uses two 1D arrays of type integer. Array1 contains 600 elements and Array2 contains 200 elements. Array1 contains sample values read from a sensor. The sensor always takes three consecutive samples and all of these values are stored in Array1. A procedure Summarise() will calculate the average of three consecutive values from Array1 and write the result to Array2. This will be repeated for all values in Array1. The diagram below illustrates the process for the first six entries in Array1. Array1 10 20 15 40 41 42 Array2 15 41 Comment average of first three values average of next three values Write pseudocode for the procedure Summarise().

  1. Write pseudocode for the procedure Summarise().[5]

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. [1] Procedure heading and ending and declaration of both indexes
  2. [1] Loop to process all elements from Array1
  3. [1] Sum (any) three consecutive values from Array1 and divide by 3 in a loop
  4. [1] Convert result to Integer
  5. [1] Assign value to correct element of Array2 in a loop
  6. [1] Increment Array2 index in a loop
  7. PROCEDURE Summarise() DECLARE Value : REAL DECLARE IXA, IxB : INTEGER // Index variables IxB <- 1 FOR IXA <- 1 TO 598 STEP 3 Value <- Array1[IxA] + Array1[IxA + 1] + Array1[IxA + 2] Value <- Value / 3 Array2[IxB] <- INT(Value) IxB <- IxB + 1 NEXT IXA ENDPROCEDURE

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, 5 marks.
Source
A-Level Computer Science, Oct/Nov 2022 Paper 2 Variant 1, question 5.

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