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

The flowchart shows an algorithm that should allow 60 test results to be entered into the variable Score. Each test result is checked to see if it is 50 or more. If it is, the test result is assigned to the Pass array. Otherwise, it is assigned to the Fail array. [Figure 4.1]

  1. (a)Complete this flowchart:[6]
  2. (b)Write a pseudocode routine that will check that each test result entered into the algorithm is between 0 and 100 inclusive.[4]

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 2022). The mark or mark type is shown in brackets.

  1. [6] One mark per mark point, max six
  2. MP1 input box
  3. MP2 correct check of Score
  4. MP3 assign Score to Pass correctly
  5. MP4 assign Score to Fail correctly
  6. MP5 increment both array counters
  7. MP6 correct check of number of scores
  8. START
  9. PassCount ← 0
  10. FailCount ← 0
  11. Count←0
  12. INPUT Score
  13. Yes IS Score >= No
  14. 50?
  15. Pass [PassCount) ← Score
  16. Fail [FailCount) ← Score
  17. PassCount ← PassCount + 1
  18. FailCount FailCount + 1
  19. Count Count + 1
  20. No IS Count =
  21. Yes 60?
  22. END
  23. [4] One mark per mark point, max four
  24. MP1 appropriate conditional loop structure
  25. MP2 correct identification of invalid input
  26. MP3 appropriate error message
  27. MP4 repeated input of score until correct
  28. WHILE Score < 0 OR Score > 100 (DO)
  29. OUTPUT "Your entry must be between 0 and 100, inclusive, please try again "
  30. INPUT Score
  31. ENDWHILE
  32. Or:
  33. REPEAT
  34. IF Score < 0 OR Score > 100
  35. THEN
  36. OUTPUT "Your entry must be between 0 and 100, inclusive, please try again "
  37. INPUT Score
  38. ENDIF
  39. UNTIL Score >= 0 AND Score <= 100

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, 10 marks.
Source
O-Level Computer Science, May/June 2022 Paper 2 Variant 1, question 4.

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