Skip to main content
A-LevelComputer ScienceAlgorithm design and problem-solving9618/22 · Oct/Nov 2023 · Q27 Marks

An algorithm will: 1. input a sequence of integer values, one at a time 2. ignore all values until the value 27 is input, then sum the remaining values in the sequence 3. stop summing values when the value 0 is input and then output the sum of the values.

  1. (a)Draw a program flowchart to represent the algorithm.[5]
  2. (b)The solution to the algorithm includes iteration. Give the name of a suitable loop structure that could be used. Justify your answer. Name Justification[2]

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 2023). The mark or mark type is shown in brackets.

  1. [5] One mark per point:
  2. 1 Initialise Total to zero
  3. 2 Check for only first input of 27 in a loop then attempt to sum values
  4. 3 Loop until 0 input
  5. 4 Sum values input (after input of first 27) in a loop
  6. 5 Output Total after a reasonable attempt
  7. [2] One mark per point:
  8. 1 Name: (pre / post) conditional loop
  9. 2 Justification: the number of iterations is not known // loop ends following a specific input (in the loop)

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, 7 marks.
Source
A-Level Computer Science, Oct/Nov 2023 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