INPUT
INPUT followed by a variable name reads a value typed by the user and stores it in that variable. Use one variable per INPUT, and OUTPUT a prompt first.
Understanding INPUT in IGCSE Computer Science Paper 2
What it does: OUTPUT displays the prompt so the user knows what to type, then INPUT reads the reply into Age. INPUT is followed by the identifier (variable name) with no quotes. The value the user types is stored in that variable. Use one variable per INPUT. To read two values, write two INPUT statements, for example INPUT Width then INPUT Height. To store a value in one array element, give the index in square brackets. INPUT Marks on its own does not say which element to fill. The fix is OUTPUT "Enter a number" followed by INPUT Number.
Common mistakes: Pseudocode uses the keyword INPUT to read a value typed by the user. READ is not a pseudocode keyword. It should be INPUT Name. INPUT must name the variable that was declared. Aged is a different, undeclared variable, so the value would not be stored in Age. It should be INPUT Age.
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 156–165) and word search (Modules 146–165).
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
INPUT AnswerFill in the Blanks
Spot the Error
Student with a class code? Join your class →