A problem can be broken down into 4 components:
1. Input – any data that is needed to solve the problem
2. Processing – the task that will be carried out to solve the problem
3. Output – the end result of the problem
4. Storage – variable are used to store data/values to perform calculation
The IPO (Input, Processing & Output) chart can be used to analyse a problem. This is a table with three columns, which represent three components: input, output and processing. Storage component is not shown.
Input | Processing | Output |
Follow these 5 steps to complete an IPO Chart:
- Write the input (what is needed from the person using the algorithm).
- Write the output (the end result that is stated in the problem).
- In the processing column write “get” and anything that is under the input column. If nothing is under the input column, leave out this step.
- Ask yourself the following question. “What do I have to do with the inputs in order to produce the desired output?” Then write down what should be done.
- Write “display” and anything under the Output column.
E.g. A program is required to read three numbers, calculate and print their total.
Three numbers are needed so write “3 numbers” under INPUT
Input | Processing | Output |
3 numbers |
The question asks for the total to be printed so Sum or Total can be used.
Input | Processing | Output |
3 numbers | Total |
- Write down the word that is followed by 3 numbers.
- Write what should be done to produce the total which is “Calculate the total”
- Write down the word display followed by total.
Input | Processing | Output |
3 numbers | get 3 numberscalculate the totaldisplay total | Total |