Skip to main content
A-LevelComputer ScienceAlgorithm design and problem-solving9618/21 · Oct/Nov 2023 · Q27 Marks

2 An algorithm is expressed as follows: • input 100 numbers, one at a time • keep a total of all numbers input that have a value between 30 and 70 inclusive and output this total after the last number has been input. Outline, using stepwise refinement, the five steps for this algorithm which could be used to produce pseudocode. Do not use pseudocode statements in your answer.

  1. (a)Step 1 Step 2 Step 3 Step 4 Step 5[5]
  2. (b)Sequence is one programming construct. Identify two other programming constructs that will be required when the algorithm is converted into pseudocode. Construct 1 Construct 2[2]

Mark scheme

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

  1. [1] Set total to zero
  2. [1] Input a number
  3. [1] Check if number greater than 29 and less than 71
  4. [1] if check is true - add number to total
  5. [1] Repeat from step 2 99 times / for a total of 100 iterations
  6. [1] Output the total
  7. [1] An iterative construct / a (count-controlled) loop
  8. [1] A selection construct / an IF statement

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, A-Level Computer Science (syllabus 9618). Structured question, 7 marks.
Source
A-Level Computer Science, Oct/Nov 2023 Paper 2 Variant 1, 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