Before you write an algorithm, you must be clear about what goes in, what must happen, and what must come out. CSEC calls this defining a problem by decomposing it into its significant components. The tool we use is the IPO chart (also called a defining diagram).
Build on what you learned in Forms 1–3
These Lower School ICT posts cover the basics of this topic:
- Using Computational Thinking to solve a Math problem – working out what is given and what is needed
- Algorithm Solution: Using Computational Thinking to solve a Math problem – the worked solution
In this post:
- Input, processing and output
- How to build an IPO chart
- Worked examples
- Turning an IPO chart into an algorithm
The three components
- Input – the data that must be given to the solution (what the user types in or what is read). Look for nouns in the problem such as “the price”, “three marks”, “the number of hours”.
- Processing – the steps or calculations that change the input into the output. Look for verbs such as “calculate”, “add”, “find”, “compare”.
- Output – the results the solution must produce or display. Look for words like “print”, “display”, “output”.
An IPO chart is simply a table with three columns: Input, Processing and Output.
Worked example 1: area of a garden plot
Problem: Write an algorithm to read the length and width of a rectangular garden plot and print its area.
| Input | Processing | Output |
|---|---|---|
| length, width | Read length and width Calculate area = length × width Display area | area |
Worked example 2: electricity bill
Problem: A customer is charged $0.45 for every kilowatt-hour (kWh) used plus a fixed charge of $20. Read the number of kWh used and print the amount due.
| Input | Processing | Output |
|---|---|---|
| units used (kWh) | Read units Calculate amount = (units × 0.45) + 20 Display amount | amount due |
Notice that the rate ($0.45) and the fixed charge ($20) are not inputs – they are given in the question and never change, so they are constants. You will learn more about this in the next post.
Worked example 3: highest of three cricket scores
Problem: Read the scores of three batsmen and print the highest score.
| Input | Processing | Output |
|---|---|---|
| score1, score2, score3 | Read the three scores Compare the scores to find the highest Display the highest | highest score |
From IPO chart to algorithm
Once the IPO chart is done, the algorithm almost writes itself. For the garden plot:
Pseudocode
START
READ length, width
area ← length * width
PRINT "The area is ", area
STOP
Tip for exams: in the Processing column, write the steps in the order they happen and include the formula. Do not put the output values in the Input column!
Try it: Input, Processing or Output?
A program must read a student’s three test marks, calculate the average and display the average and a “Pass” or “Fail” message. Classify each item.
| The three test marks | |
| Add the three marks and divide by 3 | |
| The average mark | |
| Check whether the average is 50 or more | |
| The message “Pass” or “Fail” |
Paper 1 practice (multiple choice)
Choose the best answer for each question. Try them all before you check.
1. In an IPO chart, the “P” stands for
(A) printing
(B) processing
(C) program
(D) pseudocode
2. A program reads the price of an item and the quantity bought, then displays the total cost. The INPUTS are
(A) total cost only
(B) price and quantity
(C) price, quantity and total cost
(D) quantity only
3. Which of the following belongs in the Processing column?
(A) The number of hours worked
(B) Calculate pay = hours × rate
(C) The pay
(D) A printed payslip
4. An IPO chart is used to
(A) translate a program into machine code
(B) define a problem by breaking it into its components
(C) find syntax errors
(D) store data in memory
5. A program calculates the area of a circle using πr². Which is an input?
(A) π
(B) the radius
(C) the area
(D) the formula
Show answers
1. B
2. B
3. B
4. B
5. B
Paper 2 practice (structured question)
A taxi driver in Kingston charges a fixed fee of $300 plus $150 for every kilometre travelled. A program is needed to read the distance travelled and display the fare.
(a) State the meaning of EACH of the following terms in problem-solving:
(i) input (1 mark)
(ii) output (1 mark)
(b) Draw an IPO chart for the taxi fare problem. (4 marks)
(c) Identify ONE constant in this problem. (1 mark)
(d) Write the formula used in the processing step. (1 mark)
Total: 8 marks
Show answers
(a)
(i) The data that must be supplied to the solution for it to be solved (1 mark)
(ii) The result(s) that the solution must produce or display (1 mark)
(b) Input: distance (1 mark). Processing: read distance (1 mark); calculate fare = 300 + 150 × distance (1 mark). Output: fare (1 mark).
(c) The fixed fee of $300 OR the rate of $150 per kilometre (1 mark).
(d) Fare = 300 + (150 × distance) (1 mark).
Next: Variables, Constants and Data Types: Integer, Real, Character, String and Boolean
Syllabus link: This post is relevant to the CSEC® Information Technology Syllabus (CXC 30/G/SYLL 17), Section 7: Problem-Solving and Program Design, Specific Objective 3 (“define a problem by decomposing it into its significant components”).
Attributions to media used in this post:
No third-party images are used in this post. Embedded videos are credited on YouTube to their channels.
© 2026 Vedesh Kungebeharry. All rights reserved.