Skip to main content
O-LevelComputer ScienceAlgorithm design and problem-solving2210/21 · May/June 2021 · Q56 Marks

The flowchart represents an algorithm. The algorithm will terminate if −1 is entered. [Figure 5.1]

  1. (a)Complete the trace table for the input data: 50, 75, 99, 28, 82, 150, -1, 672, 80[4]
  2. (b)Describe the purpose of the algorithm.[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 (May/June 2021). The mark or mark type is shown in brackets.

  1. [1] Row 1 (Value 50): Diff1 = 50, Diff2 = 0, OUTPUT = Accept: Extreme
  2. [1] Row 2 (Value 75): Diff1 = 25, Diff2 = 25, OUTPUT = Accept: Normal
  3. [1] Row 3 (Value 99): Diff1 = 1, Diff2 = 49, OUTPUT = Accept: Normal
  4. [1] Row 4 (Value 28): Diff1 = null, Diff2 = null, OUTPUT = Reject: Abnormal
  5. [1] Row 5 (Value 82): Diff1 = 18, Diff2 = 32, OUTPUT = Accept: Normal
  6. [1] Row 6 (Value 150): Diff1 = null, Diff2 = null, OUTPUT = Reject: Abnormal
  7. [1] Row 7 (Value -1): Termination (no output)
  8. [1] To output the type of test data
  9. [1] by performing a range check // by checking if numbers are within the range 50 and 100 (inclusive) (or not).

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, O-Level Computer Science (syllabus 2210). Structured question, 6 marks.
Source
O-Level Computer Science, May/June 2021 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