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

Write an algorithm using either pseudocode or a flowchart, to: • input a positive integer • use this value to set up how many other numbers are to be input • input these numbers • calculate and output the total and the average of these numbers.

  1. Write an algorithm using either pseudocode or a flowchart, to: • input a positive integer • use this value to set up how many other numbers are to be input • input these numbers • calculate and output the total and the average of these numbers.[6]

Mark scheme

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

  1. 1 mark for each, there may be other solutions, award full marks for any working solution
  2. any six from:
  3. initialise total (outside loop)
  4. Input number of numbers (outside loop with validation)
  5. Loop using input value
  6. Input number (inside loop)
  7. Update Total (inside loop)
  8. Calculate average
  9. Print average and total (outside loop)
  10. Sample algorithm:
  11. INPUT NumberCount
  12. Total ← 0
  13. FOR Count ← 1 TO NumberCount
  14. INPUT Number
  15. Total ← Total + Number
  16. NEXT
  17. Average ← Total/NumberCount
  18. PRINT Total, Average

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, 6 marks.
Source
O-Level Computer Science, Oct/Nov 2017 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