INPUT and OUTPUT statements
INPUT stores a value the user types into a variable. OUTPUT displays a message or value on screen. Show several items by separating them with commas.
Understanding INPUT and OUTPUT statements in IGCSE Computer Science Paper 2
What it does: The OUTPUT line tells the user what to type, then INPUT stores the answer in Number. The comma separates the text from the variable so both appear together in one OUTPUT statement. Items in an OUTPUT statement must be separated by commas. A text message needs a pair of double quotation marks, one at the start and one at the end. Without quotes, OUTPUT displays the value stored in the variable. With quotes, it would show the word Total.
Common mistakes: INPUT must be followed by a variable name that will store the typed value. You cannot input into the value 5. It should be INPUT Number. When OUTPUT shows several items, they must be separated by commas. A comma is missing after the message. It should be OUTPUT "Total is ", Total.
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 358–368) and word search (Modules 358–378).
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 and OUTPUTFill in the Blanks
Spot the Error
Student with a class code? Join your class →