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

This flowchart checks a batch of 10 rice sacks for weight. Sacks should weigh 50 kilograms each. Sacks weighing over 50.5 kilograms or less than 49.5 kilograms are rejected. The number of sacks accepted and the number of sacks rejected is output. [Figure 5.1]

  1. (a)Complete the trace table for the input data: 50.4, 50.3, 49.1, 50.3, 50.0, 49.5, 50.2, 50.3, 50.5, 50.6 Accept Reject Count Sack OUTPUT[5]
  2. (b)The size of the batch has increased to 50 sacks. It has been decided to only reject sacks that are underweight. State the changes that need to be made to the flowchart.[2]

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 (Oct/Nov 2017). The mark or mark type is shown in brackets.

  1. Accept, Reject, Count, Sack, OUTPUT
  2. 0, 0, 0
  3. 1, , 1, 50.4
  4. 2, , 2, 50.3
  5. , 1, 3, 49.1
  6. 3, , 4, 50.3
  7. 4, , 5, 50.0
  8. 5, , 6, 49.5
  9. 6, , 7, 50.2
  10. 7, , 8, 50.3
  11. 8, , 9, 50.5
  12. , 2, 10, 50.6, 8 2
  13. [1 mark]
  14. change to Is Count = 50?
  15. remove IS Sack > 50.5?

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 2017 Paper 2 Variant 2, 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