Community resourceWorksheet
J277 2.1.2 Inputs, processes, outputs and decomposition
Part 2 of 3 · J277 2.1.1-2.1.2 · Computational thinking and algorithms
Defining a problem before writing any code, using the input-process-output model and decomposition.
Students will:
- define a problem using the input-process-output model
- decompose a large problem into smaller testable parts
- read and complete a structure diagram
- identify inputs, processes and outputs in running code
- explain why decomposition makes testing easier
Inside: 5 explanation cells, 1 runnable Python task, 2 multiple-choice questions, 1 fill-in-the-blanks cell and 4 written answers. 20 marks, about 45 minutes.
Series: J277 2.1.1-2.1.2 · Computational thinking and algorithms, part 2 of 3.
Shared by Coding PathwayVerified teacher
- 13 cells
- About 45 minutes
- CC BY-SA 4.0
- Shared 17 Aug 2026
- Updated 9 Sept 2026
Preview
The whole resource, exactly as a class sees it. Answers and marking are held back.
Inputs, processes, outputs and decomposition
Before writing code, define what a solution receives, what it does and what it produces. This is the input-process-output model, often shortened to IPO. You will also use decomposition to turn a large problem into smaller, testable parts.
Defining a problem with IPO
- An input is data supplied to the system, such as a value typed by a user or read by a sensor.
- A process is an operation performed on the data, such as a calculation, comparison or search.
- An output is information produced by the system, such as text displayed, a sound played or a file updated.
One problem can have several inputs, processes and outputs. Be specific: “calculate price × quantity” is more useful than “do the maths”.
A fitness app receives the distance travelled, multiplies it by a conversion factor and displays miles. Which item is the process?
- AThe distance entered
- BThe number of miles displayed
- CThe conversion calculation
- DThe phone screen
- process
- output
- storage
- input
- algorithm
A library kiosk allows a student to scan a book and student card, checks whether the book may be borrowed, records the loan and displays a due date. Identify two inputs, two processes and one output.
Use headings Input, Process and Output. Describe data, not just the physical device that collects it.
Students type their answer here.
Decompose before you code
The kiosk could be split into sub-problems: read identifiers, find records, validate the loan, calculate the due date, update the records and display a result. Each sub-problem has a clear purpose and can be considered separately.
Good decomposition avoids pieces that are so broad they simply repeat the whole problem. “Make the library system” is not a useful sub-problem.
Structure diagrams
A simple structure diagram shows the whole problem at the top, its subsections underneath and any smaller subsections below those. For example:
The connecting lines show which smaller sections belong to each larger section. They do not show the execution order of an algorithm.
Which is the most useful sub-problem when decomposing an online quiz system?
- ABuild the entire quiz
- BMake it good
- CUse a computer
- DCheck a submitted answer against the stored answer
Seeing IPO in a running program
The next example converts a duration from minutes into hours and remaining minutes. The stored number of minutes is the input data, integer division and remainder are the processes, and the two displayed values are the output. In Python, // 60 calculates the number of complete hours and % 60 calculates the minutes left over after those complete hours.
Predict the result for 135 minutes before running the cell. Afterwards, try 60 and 59 to see how the same algorithm handles boundary values.
# Run this small IPO example.
minutes = 135 # input data
hours = minutes // 60 # process
minutes_left = minutes % 60 # process
print(hours, minutes_left) # output
Extend the school trip structure diagram with five suitable sub-problems.
Use an indented hierarchy to show which smaller sections belong to the main problem. Think about student details, places, permission, payment and confirmation.
Students type their answer here.
Choose one sub-problem from your school trip structure. State one input, the process performed and one output for that sub-problem.
Use the headings Input, Process and Output. Keep all three parts connected to the same chosen sub-problem.
Students type their answer here.
Why should inputs and outputs be identified before the detailed algorithm is written?
Link your answer to what the solution must receive and produce.
Students type their answer here.
Review
You should now be able to define a problem through its inputs, processes and outputs, decompose it into useful sub-problems, and represent the links between those sections in a simple structure diagram.
In an exam response, name the actual data and operation. “The user enters something and the computer works it out” is too vague; “the student identifier is input and checked against the stored loan records” is precise enough to earn credit.