← IGCSE Computer Science Paper 2

Component parts of a problem: outputs

The result a solution gives out, such as a message on screen, a printout, a sound or a signal that switches a device on or off.

Understanding Component parts of a problem: outputs in IGCSE Computer Science Paper 2

What it does: The OUTPUT statement displays the calculated total on the screen, which is a screen output. The solution sends a signal to switch a device on, so it is an output that controls an actuator. Data going in is an input. An output is the result that comes out. Signals sent to an actuator, such as a fan, motor or buzzer, are outputs. Sensors give inputs. Outputs can be sound as well as text, pictures or printouts. The item chosen is entered, so it is an input. Only what the system gives out is listed as an output. Calculating is a process. The result only becomes an output when it is shown, printed, spoken or sent to a device.

Common mistakes: INPUT reads data into the program. To show a message on the screen the line must use OUTPUT: OUTPUT "Fan is on". The text message is missing its closing quote mark. It should be OUTPUT "Your score is ", score so that score is output as a value.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

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 94–106) and word search (Modules 94–118).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
A program shows 'Welcome, Sam!' on the monitor. Is this an output?
No - only printed results count as outputsYes - it is a result the solution gives out on a screen
Matches
INPUT "Your score is ", Score
↓
INPUT is used where OUTPUT is needed. INPUT takes data in from the user, but a message that shows a result must use OUTPUT.
Applying
Meanings
Term
output
Meaning
The result a solution gives out, such as a message on screen, a printout, a sound or a signal that switches a device on or off.
Practice
temp ← 18
Testing
Gaps
"Your total is ", Total
Check Answer
Spots
3 fanSignal ← TRUE
4 INPUT "Fan is on"

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Armadillo' badge — Shield Bearer, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. A program shows 'Welcome, Sam!' on the monitor. Is this an output?
A. Yes - it is a result the solution gives out on a screen ✓
B. No - only printed results count as outputs
Any result shown on a screen, such as a message or a total, is an output.
2. A student types their password on a keyboard. Which part of the problem is this?
A. An output, because the keyboard is a device
B. An input, because data goes into the system ✓
Data going in is an input. An output is the result that comes out.
3. Which of these is an output?
A. A receipt printed after a purchase ✓
B. A barcode scanned at the till
The printed receipt is a result given out. The scanned barcode is data going in, so it is an input.
4. A smart greenhouse sends a signal that switches a fan on when it is too hot. What is that signal?
A. An output that controls an actuator ✓
B. An input from a sensor
Signals sent to an actuator, such as a fan, motor or buzzer, are outputs. Sensors give inputs.
5. A satnav says 'Turn left in 200 metres' aloud. Does this count as an output?
A. No - outputs must be text on a screen
B. Yes - a spoken result is an output ✓
Outputs can be sound as well as text, pictures or printouts.

Match the Pairs

OUTPUT "Welcome, " & Name → Shows a message on the screen that joins a greeting to the user's name
OUTPUT "Heater ON" → Gives a signal or message that tells a device to switch on
A result shown on a screen is an output → OUTPUT "Your total is ", Total
A signal that controls an actuator is an output → OUTPUT "Sprinkler ON"
INPUT "Your score is ", Score → INPUT is used where OUTPUT is needed. INPUT takes data in from the user, but a message that shows a result must use OUTPUT.
Outputs for an alarm system: keypad code, door sensor → These are inputs, not outputs. The keypad and door sensor send data in. The outputs would be the siren and a warning message.

Key Term

output
The result a solution gives out, such as a message on screen, a printout, a sound or a signal that switches a device on or off.

Fill in the Blanks

1. OUTPUT "Your total is ", Total
Hint: Type the pseudocode keyword that gives a result to the screen.
2. Total ← Price * Quantity OUTPUT Total
Hint: Type the variable that holds the calculated result to be displayed.
3. IF Temp > 30 THEN OUTPUT "FAN ON" ENDIF
Hint: Type the comparison operator that decides when the signal to the fan is sent.
4. INPUT Name OUTPUT "Hello ", Name
Hint: Type the keyword that reads data into the program, not the one that gives results out.
5. FOR Count ← 1 TO 3 OUTPUT Count NEXT Count
Hint: Type the loop variable that closes the loop, the same one that is output each time.

Spot the Error

Question 1
A INPUT temp
B IF temp > 28 THEN
C fanSignal ← TRUE
D INPUT "Fan is on"
E ENDIF
Line D — INPUT reads data into the program. To show a message on the screen the line must use OUTPUT: OUTPUT "Fan is on".
Question 2
A score ← 85
B OUTPUT "Your score is , score
C OUTPUT "Well done"
Line B — The text message is missing its closing quote mark. It should be OUTPUT "Your score is ", score so that score is output as a value.
Question 3
A INPUT name
B greeting ← "Hello "
C OUTPUT "greeting", name
Line C — Quotes make greeting a piece of text, so the screen would show the word greeting. To output the value stored in the variable, write OUTPUT greeting, name.
Question 4
A PRINT "Enter your age"
B INPUT age
C OUTPUT "Age is ", age
Line A — Cambridge pseudocode uses OUTPUT to give a result or prompt on screen, not PRINT. It should be OUTPUT "Enter your age".
Question 5
A INPUT light
B IF light < 20 THEN
C OUTPUT ← "Lamp ON"
D ENDIF
Line C — OUTPUT is a keyword, not a variable, so nothing can be assigned to it with ←. The line should be OUTPUT "Lamp ON".

Student with a class code? Join your class →