Skip to main content
A-LevelComputer ScienceProgramming9618/21 · May/June 2025 · Q38 Marks

A student has been asked to create a simple guessing game program. This program will generate a random integer value between 1 and 100. It will then repeatedly prompt the user to input an integer value until they input the randomly generated value. The student has written a structured English description: step 1 - randomly generate an integer value between 1 and 100 inclusive step 2 - prompt the user to input an integer value step 3 - output an appropriate message if the value input was too high; then repeat from step 2 step 4 - output an appropriate message if the value input was too low; then repeat from step 2 step 5 - output an appropriate message if the value input was the same value that was randomly generated; then end the program. Write a pseudocode algorithm from this structured English description. Assume no input validation is needed.

Mark scheme

Marking points from the official mark scheme (May/June 2025). The mark or mark type is shown in brackets.

  1. [1] Declare all variables used
  2. [1] Uses RAND() function
  3. [1] Uses INT() function
  4. [1] Correct syntax for random number between 1 and 100
  5. [1] Conditional loop until correct number guessed
  6. [1] Prompt and input a guess in a loop
  7. [1] Check if guess is too high in a loop
  8. [1] Check if guess is too low in a loop
  9. [1] Output appropriate message (x2) when the number is not guessed correctly (in the loop) and output correct guess message

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, 8 marks.
Source
A-Level Computer Science, May/June 2025 Paper 2 Variant 1, question 3.

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