In simple terms
A friendly intro before the formal notes — no formulas yet.
From Idea to Instruction
Designing an algorithm is like writing a recipe before you start cooking. You need a clear, step-by-step plan that anyone (or any computer) can follow to achieve a specific goal.
Imagine you're explaining how to make a cup of tea to someone who has never done it before. You wouldn't just say 'make tea'. You'd provide a sequence of precise instructions: 'boil water', 'put teabag in mug', 'pour water into mug', and so on. Flowcharts are like a comic strip of this process, showing each step visually, while pseudocode is like writing the recipe down in a simplified, clear language that isn't quite English but also isn't a specific programming language.
- 1
Define the problem: Clearly state the goal. What is the input, what is the process, and what is the desired output?
- 2
Design the logic: Break the problem down into a sequence of simple, unambiguous steps. Consider any decisions (e.g., 'if the water is boiling...') or loops (e.g., 'stir until sugar dissolves').
- 3
Represent the algorithm: Choose a method to document your logic. A flowchart provides a visual map, while pseudocode offers a structured, text-based plan.
- 4
Test and refine: Trace your flowchart or pseudocode with sample data to check for logical errors. Does it produce the correct output in all expected cases?
Explore the concept
Use the live diagram and synced steps — play it or tap a step card to walk through.
Full topic notes
Formal explanation with the rigour you need for the exam.
Characteristics of an Algorithm
A well-defined algorithm must possess several key characteristics. It must be finite, meaning it will eventually terminate after a set number of steps. Each step must be unambiguous and precisely defined, leaving no room for interpretation. Furthermore, each step must be executable, meaning it is possible to carry it out in practice. Finally, an algorithm is designed to solve a specific problem, taking defined inputs and producing a desired output.
Flowcharts: Visualising Logic
Flowcharts provide a graphical representation of an algorithm's logic flow. They use a set of standard symbols connected by arrows to show the sequence of operations. This visual approach is excellent for understanding the overall structure of a simple to moderately complex algorithm and for identifying the flow of control, especially in constructs like loops and decisions.
Terminator (Oval): Marks the 'Start' and 'End' of the algorithm.
Process (Rectangle): Represents an action or calculation, like .
Input/Output (Parallelogram): Used for INPUT or OUTPUT operations.
Decision (Diamond): Contains a condition that evaluates to true or false, branching the flow.
Connector (Arrow): Shows the direction of logical flow from one step to another.
Sub-program (Rectangle with double sides): Represents a call to a function or procedure.
Pseudocode: Structuring Logic with Text
Pseudocode is a text-based method for describing an algorithm. It is not tied to the syntax of any particular programming language, allowing the designer to focus purely on the logic. The IB provides an 'Approved Pseudocode' guide which specifies conventions for loops, conditionals, and input/output that you must use in exams. It is more concise than a flowchart for complex algorithms and is easier to translate into actual code.
In exams, clarity is key. Whether using a flowchart or pseudocode, ensure your logic is easy to follow. For pseudocode, use indentation to clearly show the structure of loops and conditional statements. You are not being tested on perfect syntax, but on clear, logical problem-solving.
Worked examples
See the formulas applied — reveal one step at a time, like the exam.
Construct a flowchart to prompt a user for the radius of a circle, calculate its area, and output the result. The formula for the area is . Use 3.14 for .
- 1
Start: An oval symbol with the text 'Start'.
Write an algorithm in pseudocode that takes an integer score as input. If the score is 50 or greater, it should output "Pass". Otherwise, it should output "Fail".
- 1
OUTPUT "Enter score" INPUT score
How it all connects
The big idea sits in the middle — tap a linked idea to explore the link.
Tap a linked idea to see how it connects back to the main topic — that connection is what examiners reward.
Glossary
Try to recall each definition before you reveal it.
Quick check
Answer in your head first — then tap to check. No pressure.
Revision flashcards
Flip the card. Test yourself before the exam.
What is an algorithm?
A finite, ordered set of unambiguous, executable steps that defines a terminating process to solve a specific problem.
Key takeaways
Review these before you close the topic — retrieval beats re-reading.
- ✓
Terminator (Oval): Marks the 'Start' and 'End' of the algorithm.
- ✓
Process (Rectangle): Represents an action or calculation, like .
- ✓
Input/Output (Parallelogram): Used for INPUT or OUTPUT operations.
- ✓
Decision (Diamond): Contains a condition that evaluates to true or false, branching the flow.
- ✓
Connector (Arrow): Shows the direction of logical flow from one step to another.
- ✓
Sub-program (Rectangle with double sides): Represents a call to a function or procedure.
Practice — then mark it
The whole point: a real Cambridge question, marked mark-by-mark.
Test Your Knowledge on Algorithm Design
Test Your Knowledge on Algorithm Design
Extra simulations & links
PhET, GeoGebra and other curated tools — open in a new tab.
Frequently asked
Checkpoint
One marked question is worth ten re-reads — close the loop before you move on.
Reading it isn’t knowing it — prove it.
Before you move on: do Test Your Knowledge on Algorithm Design on paper, snap a photo, and get examiner-style feedback on exactly where you win and lose marks.