Computer Science (AS & A Level) · May / June 2025 · Paper 21 · Question 3
9618
As printed in the paper
The question as text
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. [8]
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

