Topic 11 Β· Programming Scenarios Β· 11.2

Inputs, Processes and Outputs

Learn how to use the IPO method and computational thinking to turn a programming scenario into a clear plan.

Invitation

How do you make a large problem feel smaller?

Imagine being given a long programming scenario containing several instructions. Trying to hold every requirement in your head at once can feel difficult.

Instead, sort the requirements into three groups: what enters the program, what the program does and what it produces.

The IPO method turns a long scenario into a simple and manageable plan.
The IPO method
Input
↓
Process
↓
Output
Big Idea

Most programs follow the same pattern

InputData enters the program.
β†’
ProcessThe program uses or changes the data.
β†’
OutputThe result leaves the program.
Input β†’ Process β†’ Output is a pattern found in simple programs and large software systems.
Computational Thinking

All four thinking skills support the IPO method

DecompositionBreak the scenario into separate requirements and smaller tasks.
Pattern RecognitionSpot familiar inputs, calculations, decisions, loops and outputs.
AbstractionIgnore background story details and keep only the data and rules needed by the program.
Algorithm DesignArrange the inputs, processes and outputs into the correct order.
Computational thinking helps you discover the IPO plan hidden inside the scenario.
Visual Guide

Ask three questions

What enters?These are the inputs that must be stored in variables.
What must happen?These are the calculations, decisions or repeated actions.
What must be shown?These are the outputs required by the scenario.
Read the scenario twice, then sort every important requirement into the IPO plan.
Worked Example

Plan a simple calculator

A calculator program must:

Requirement 1Take a first integer from the user.
Requirement 2Take an operator such as +, βˆ’, Γ— or Γ·.
Requirement 3Take a second integer.
Requirement 4Calculate and output the result.
Decompose the scenario
Number 1
Operator
Number 2
↓
Calculate result
InputProcessOutput
First integer
Operator
Second integer
Check the operator.
Perform the matching calculation.
The result of the calculation.
Pattern recognition: This is a familiar selection pattern because the operator decides which calculation runs.
Abstraction

Keep what affects the solution

Story detail

The calculator might be used in a shop, classroom or office.

This does not change the algorithm.

Essential detail

The program needs two integers, an operator, a calculation and a result.

These details must appear in the solution.

Abstraction removes distraction without removing any requirement that affects the program.
Hinge Question

Where does a decision belong?

Question

A calculator checks whether the operator is +, βˆ’, Γ— or Γ·. Is this an input, process or output, and why?

β€œIt is a process because the program uses the operator to decide which calculation to perform.”
Exam Explainer

Build the plan before the code

Step 1Read the whole scenario twice.
Step 2Underline every requirement.
Step 3Sort each requirement into input, process or output.
Exam tip: If a process is difficult to identify, use example values and carry out the task yourself. The action you perform is the process.
Common Mistake

Do not confuse an input with a process

Input

The operator entered by the user.

Process

Checking the operator and performing the calculation.

Output

Displaying the calculated result.

Remember: Data entering the program is an input. What the program does with that data is the process.
Summary

Turn the scenario into a visible plan

InputWhat data enters?
ProcessWhat must happen?
OutputWhat result is produced?
Final rule: Use computational thinking to break down the scenario, recognise familiar patterns, remove distractions and design the IPO plan.