Skip to main content
O-LevelComputer ScienceProgramming2210/22 · Oct/Nov 2019 · Q54 Marks

A programmer writes a program to weigh baskets of fruit in grams, keeping a total of the weight and counting the number of baskets. The total weight is stored in a variable Total and the number of baskets is stored in a variable BasketCount. Explain, including examples of programming statements, how totalling and counting could be used in this program. Totalling Counting

  1. TotallingExplain, including examples of programming statements, how totalling could be used in this program.[2]
  2. CountingExplain, including examples of programming statements, how counting could be used in this program.[2]

Mark scheme

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

  1. [4] Totalling:
  2. ∞ Adding the weight of each basket to the total weight as each weight is entered
  3. ∞ Total = Total + Weight
  4. Counting:
  5. ∞ Adding one to/incrementing the number of baskets as each weight is entered
  6. ∞ BasketCount = BasketCount + 1

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
Programming, O-Level Computer Science (syllabus 2210). Structured question, 4 marks.
Source
O-Level Computer Science, Oct/Nov 2019 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