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

Input, process and output flow Data is received as input, transformed by a process and presented or stored as output. Input Data received Process Work performed Output Result produced
  • 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”.

Multiple choice1 mark

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
Fill in the blanks3 marks
The temperature read from a sensor is an label 1. Comparing it with a safe limit is a label 2. Displaying a warning is an label 3.
  • process
  • output
  • storage
  • input
  • algorithm
Written answer5 marks

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:

Structure diagram for a school trip booking problem School trip booking is decomposed into Student details, Permission, Payment and Confirmation. Payment is further decomposed into Record payment and Check remaining balance. School trip booking Student details Permission Payment Confirmation Record payment Check remaining balance

The connecting lines show which smaller sections belong to each larger section. They do not show the execution order of an algorithm.

Multiple choice1 mark

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.

Worked example
# Run this small IPO example.
minutes = 135                 # input data
hours = minutes // 60         # process
minutes_left = minutes % 60   # process
print(hours, minutes_left)    # output
Written answer5 marks

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.

Written answer3 marks

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.

Written answer2 marks

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.