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

Section B 2 (a) Draw a flowchart for an algorithm to input numbers. Reject any numbers that are negative and count how many numbers are positive. When the number zero is input, the process ends and the count of positive numbers is output.

  1. (a)Draw a flowchart for an algorithm to input numbers. Reject any numbers that are negative and count how many numbers are positive. When the number zero is input, the process ends and the count of positive numbers is output.[6]
  2. (b)Explain the changes you will make to your algorithm to also count the negative numbers.[2]

Mark scheme

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

  1. [6] One mark per correct pair of actions, process, Input/Output, Tests (apart from START and END) max 3
  2. One mark complete Flowlines, one mark working flowlines, one mark correct use flowchart symbols
  3. START Count ← 0 INPUT Number Is Number = 0? Yes OUTPUT Count, " positive numbers" END No Is Number < 0? No Yes Count ← Count + 1
  4. [2] Any two from:
  5. • Use another counter/variable
  6. • Update this counter/variable when the number is less than zero/count all numbers and subtract the positive numbers
  7. • Output this counter/variable at the end // Output both counters at the end

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, 8 marks.
Source
O-Level Computer Science, May/June 2018 Paper 2 Variant 2, 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