GCSE · Computer Science · AQA · Spec 8525
Inputs, processing and outputs of algorithms
Most programs follow one pattern: something goes in, something gets worked on, something comes out. Spot those three moments and you can read a simple algorithm line by line.
Computer Science · Algorithms
In, worked on, or out?
This algorithm works out what a group pays to get into an event. Take each line in turn. Is data coming IN, being WORKED ON, or going OUT? Decide first, then read why.
Still to sort
Input: data comes in (0)
A value arrives from outside the algorithm. The user entering a number is one example.
Where the line is: An input line gets its value from outside. If the value is worked out from data that's already inside, the line is processing.
Processing: data is worked on (0)
Data already inside is calculated with, compared or changed.
Where the line is: Processing never brings data in and never sends information out. It only works on what's already there.
Output: information goes out (0)
Information leaves the computer so someone can see or use it.
Where the line is: An output can come anywhere in an algorithm, even on line 1. What matters is the direction (going out), not the position.
Line 6 is ENDIF. It just marks where the IF finishes, so it isn't in the tray.
Computer Science · Algorithms
Trace table — dry run the code
Same algorithm, now with real data. A group of 7 turns up. Step through it and follow the number: what comes in, what's done to it, and what finally comes out?
Ready when you are — step through one line at a time.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Read an algorithm the way the computer meets it: what comes in, what gets done to it, what goes out.
What you need to know
- Input is any way data gets into the computer. Output is any way information gets out. Neither has to be a keyboard or a monitor.
- Processing is the work done on data that's already inside: calculating, comparing and changing values.
- You decide a line's job by the direction the data moves, not by where the line sits. A message on line 1 is still an output.
- The computer handles input and output only where the code says, so the programmer must state exactly where and how each happens.
The big picture
A simple algorithm can be explained in three parts. Inputs are data coming in, processing is the work done on that data, and outputs are information going out. You should be able to point to the exact line where each one happens. Input and output aren't limited to a keyboard and a monitor.
Key points
Worked example
Problem
Identify the inputs, processing and outputs in this algorithm, then explain what it does. 1 OUTPUT 'How much do you save each week?' 2 weekly ← USERINPUT 3 OUTPUT 'For how many weeks?' 4 weeks ← USERINPUT 5 saved ← weekly * weeks 6 OUTPUT saved
⚠ Watch out
Calling OUTPUT 'Enter your name' an input because it asks for data. It's an output: a message is leaving the computer. The input is the next line, which stores what's typed. And input isn't just 'the keyboard', any more than output is just 'the screen'.
Memory hook
In → Worked on → Out. Point at any line and ask: which way is the data moving?
Check yourself
Cover the page. In the group-ticket algorithm, why is line 1 an output when nothing has been worked out yet? Which line is the only input, and which three are processing?
Flashcards
(9)What is an input?
What is an output?
What counts as processing in an algorithm?
How do you decide whether a line is input, processing or output?
Is OUTPUT 'Enter a number' an input or an output?
Why must the programmer specify exactly where output happens?
Name a device that is both an input and an output device.
Give three ways a computer can output information.
What three things do you say when you explain an algorithm in terms of inputs, processing and outputs?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore AQA GCSE Computer Science topics
How this lesson was checked. This AQA GCSE Computer Science (specification 8525)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 29 September 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.