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

The flowchart represents an algorithm. The predefined function DIV gives the value of the result of integer division, for example, y ← 9 DIV 4 gives y a value of 2 An input value of -1 ends the algorithm. [Figure: Flowchart with START, INPUT Value, IS Value = -1? (decision), Calc1 ← Value DIV 2, Calc2 ← Value DIV 3, IS Calc1 = Value / 2? (decision), IS Calc2 = Value / 3? (decision), OUTPUT Value, END]

  1. (a)Complete the trace table for the input data: 50, 33, 18, 15, 30, −1, 45, 12, 90, 6[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 2020). The mark or mark type is shown in brackets.

  1. [4] One mark for each correct column (max four)
  2. Value | Calc1 | Calc2 | OUTPUT 50 | 25 | 16 | 33 | 16 | 11 | 18 | 9 | 6 | 18 15 | 7 | 5 | 30 | 15 | 10 | 30 -1 | | |
  3. [2] Any two correct statements e.g. The program outputs a value, That is divisible by 6 // 2 and 3

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 2020 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