Pseudocode for user interaction: prompts and menus
A loop that prints the options, uses a print prompt then input to read a choice, runs the matching action with if / else if, and repeats until the user picks the exit option.
Understanding Pseudocode for user interaction: prompts and menus in QCE Digital Solutions Unit 3
What it does: Each branch tests the choice value and runs the matching action, which is how a menu selects what to do. The loop shows the options, reads the choice with input and repeats until the user enters 3 to exit. print only displays the prompt. The input keyword is what stores the user's answer in a variable. The loop condition must test for the same value that the exit option uses. Otherwise the menu never ends. The else catches any choice that matched no option, so it is best used to tell the user the choice was invalid.
Common mistakes: An if statement needs the keyword then after its condition. The line should be: if age >= 18 then. Pseudocode uses the keyword input to read a value from the user, not read. The line should be: input choice.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 194–250) and word search (Modules 194–337).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
menu loopFill in the Blanks
Spot the Error
Student with a class code? Join your class →