Skip to main content
O-LevelComputer ScienceAlgorithm design and problem-solving2210/22 · Oct/Nov 2023 · Q67 Marks

The flowchart represents an algorithm that performs a process on groups of values that are input. The algorithm will fail if the first value of any group is 0. An input of –1 will terminate the algorithm.

  1. (a)Complete the trace table for the input data: 25, 35, 3, 0, 57, 20, 25, 18, 0, –1, 307, 40, 0 Value Average Total Count OUTPUT[5]
  2. (b)Describe the purpose of the algorithm.[2]

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 correct column, max five
  2. Value | Average | Total | Count | OUTPUT
  3. ------|---------|-------|-------|----------
  4. | | 0 | 0 |
  5. 25 | | 25 | 1 |
  6. 35 | | 60 | 2 |
  7. 3 | | 63 | 3 |
  8. 0 | 21 | | | Total is 63
  9. | | | | Average is 21
  10. | | 0 | 0 |
  11. 57 | | 57 | 1 |
  12. 20 | | 77 | 2 |
  13. 25 | | 102 | 3 |
  14. 18 | | 120 | 4 |
  15. 0 | 30 | | | Total is 120
  16. | | | | Average is 30
  17. | | 0 | 0 |
  18. -1 | | | |
  19. [2] One mark per mark point, max two
  20. MP1 to add together / find the average of a batch of numbers
  21. MP2 the total and average are output (when the batch is complete/when 0 is entered)
  22. MP3 when 0 is entered a new batch is started.

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, 7 marks.
Source
O-Level Computer Science, Oct/Nov 2023 Paper 2 Variant 2, question 6.

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