Input, process, output in one short program
A simple program's order: DECLARE variables, INPUT values, calculate with an assignment (←), then OUTPUT the result. Each step must come before the one that uses it.
Understanding Input, process, output in one short program in IGCSE Computer Science Paper 2
What it does: OUTPUT displays the stored result, and it comes last because TotalCost must already hold a value. DECLARE comes first so the variable exists and has a data type before INPUT or an assignment gives it a value. Each step must come before the step that uses it. Declare the variables, get the values, calculate, then show the result. Length and Width need values before they can be multiplied. Area is only output after it has been calculated. The missing step is the process step. An assignment calculates Area from Radius. INPUT would ask the user for Area instead of calculating it.
Common mistakes: A DECLARE statement needs a colon between the identifier and the data type. It should be DECLARE Area : INTEGER. The user must enter the price, not the total. Total is calculated from Price on the next line. Price never gets a value this way. It should be INPUT Price.
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 327–336) and word search (Modules 317–336).
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, ←, OUTPUTFill in the Blanks
Spot the Error
Student with a class code? Join your class →