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

Write an algorithm to input 1000 numbers. Count how many numbers are positive and how many numbers are zero. Then output the results. Use either pseudocode or a flowchart.

  1. (a)Write an algorithm to input 1000 numbers. Count how many numbers are positive and how many numbers are zero. Then output the results. Use either pseudocode or a flowchart.[6]
  2. (b)Give one change you could make to your algorithm to ensure initial testing is more manageable.[1]

Mark scheme

Marking points from the official mark scheme (May/June 2018). The mark or mark type is shown in brackets.

  1. [1] (a) Initialisation of counters for positive numbers and zeros
  2. [1] (a) Appropriate loop for 1000 iterations
  3. [1] (a) Input number inside loop
  4. [1] (a) Test for positive numbers
  5. [1] (a) Update positive number counter
  6. [1] (a) Test for zeros
  7. [1] (a) Update zero counter
  8. [1] (a) Output counters with appropriate messages outside loop
  9. [1] (b) Reduce the number of iterations to a manageable amount // Simulate the input (e.g. random generation)

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, May/June 2018 Paper 2 Variant 1, 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