Skip to main content
A-LevelComputer ScienceProgramming9618/23 · Oct/Nov 2024 · Q27 Marks

An algorithm will: 1. prompt and input a sequence of 100 integer values, one at a time 2. sum the positive integers 3. output the result of the sum.

  1. (a)Write pseudocode for the algorithm. Assume the value zero is neither positive nor negative. You must declare all variables used in the algorithm.[5]
  2. (b)The algorithm requires the use of basic constructs. One of these is sequence. Identify one other basic construct required by the algorithm and describe how it is used. Construct Use[2]

Mark scheme

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

  1. [1] MP1 Declarations of all variables used
  2. [1] MP2 Loop for 100 iterations
  3. [1] MP3 Prompt and input a value in a loop and
  4. [1] MP4 Test for value > 0 // >=1 in a loop
  5. [1] MP5 Sum the Total in a loop
  6. [1] MP6 Output of Total after the loop
  7. [1] MP1 Construct: Iteration / Repetition
  8. [1] MP2 Use: To loop through all 100 inputs // To loop 100 times
  9. [1] ALTERNATIVE: MP1 Construct: Selection
  10. [1] MP2 Use: To test whether the value input is positive

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