OUTPUT command
Displays text or values on screen. Text goes in quotes. Items are separated by commas, e.g. OUTPUT "You have ", Lives, " lives left". Also used for user prompts.
Understanding OUTPUT command in IGCSE Computer Science Paper 2
What it does: Text in quotes is displayed exactly as written, so this shows the words Game over. A prompt is just OUTPUT with text, shown before the INPUT command so the user knows what to type. Text must go inside quotes. Without quotes, Welcome would be treated as a variable name. Several items in one OUTPUT command must be separated by commas. To show the value of a variable, leave out the quotes: OUTPUT Score.
Common mistakes: Items in an OUTPUT command must be separated by commas. The comma is missing between "You have " and Lives. It should be OUTPUT "You have ", Lives. Quotes make Score a piece of text, so this would display the word Score rather than 50. To display the value stored in the variable, write OUTPUT Score without quotes.
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 27–36) and word search (Modules 27–46).
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
OUTPUTFill in the Blanks
Spot the Error
Student with a class code? Join your class →