Skip to main content
O-LevelComputer ScienceAlgorithm design and problem-solving2210/23 · Oct/Nov 2025 · Q56 Marks

A program has been written in pseudocode to input five numbers between 1 and 900 inclusive and store the highest number and the lowest number entered. 01 Lowest ← 900 02 Highest ← 1 03 FOR Count ← 1 ΤΟ 5 04 INPUT Number 05 IF Number < Lowest 06 THEN 07 Lowest ← Number 08 ELSE 09 IF Number > Highest 10 THEN 11 Highest ← Number 12 ENDIF 13 ENDIF 14 NEXT Count

  1. (a)Complete the trace table for the algorithm using the following numbers: 563, 21, 376, 99, 400. Count Number Lowest Highest[4]
  2. (b)The algorithm does not work correctly. State the reason why the algorithm does not work as expected and explain how the algorithm could be corrected. Any code used must be fully explained. Reason Correction[2]

Mark scheme

Marking points from the official mark scheme (Oct/Nov 2025). The mark or mark type is shown in brackets.

  1. [1] (a) Initial values for Lowest and Highest correct
  2. [1] (a) All values in 'Number' column correct
  3. [1] (a) All values in 'Lowest' column correct
  4. [1] (a) All values in 'Highest' column correct
  5. (a) Trace Table Values: Initial Lowest=900, Highest=1; Count=1, Number=563, Lowest=563, Highest=1; Count=2, Number=21, Lowest=21, Highest=1; Count=3, Number=376, Lowest=21, Highest=376; Count=4, Number=99, Lowest=21, Highest=376; Count=5, Number=400, Lowest=21, Highest=400
  6. [1] (b) the highest score is incorrect / algorithm cannot evaluate highest value if lowest evaluated
  7. [1] (b) replace ELSE on line 08 with ENDIF and remove ENDIF on line 13 / remove nested IF and have single IF statements for Highest/Lowest

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, Oct/Nov 2025 Paper 2 Variant 3, 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