In simple terms
A friendly intro before the formal notes — no formulas yet.
Algorithm Blueprints
Flowcharts and pseudocode are like blueprints for a computer program. They allow you to design and test the logic of a solution step-by-step, without worrying about the strict rules of a programming language.
Think of baking a cake. The final, coded program is the cake itself. The pseudocode is the written recipe with a list of ingredients and step-by-step instructions, while the flowchart is a series of diagrams illustrating each step, like you might see in a children's cookbook. Both are plans that describe how to get to the finished product.
- 1
First, clearly define the problem: What are the required inputs, the necessary processing, and the expected outputs?
- 2
Next, choose your planning tool. Use a flowchart for a visual, high-level overview, or pseudocode for a more detailed, text-based plan.
- 3
Then, construct the algorithm using standard symbols or keywords. Build the logical flow using sequence, selection (IF statements), and iteration (loops).
- 4
Finally, test your design. Trace the algorithm with sample data (a 'dry run') to check for logical errors and ensure it produces the correct output.
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.
Flowcharts: Visualising Logic
A flowchart is a diagram that represents the sequence of operations in an algorithm. By using standardised symbols, we can create a clear, language-independent representation of how a program should function. This visual approach is excellent for understanding the overall flow of control, especially in complex algorithms with multiple decision points and loops.
Terminator (Oval): Marks the 'Start' and 'End' of the algorithm.
Input/Output (Parallelogram): Used for getting data from a user (INPUT) or displaying results (OUTPUT).
Process (Rectangle): Represents any calculation, assignment, or data manipulation (e.g., ).
Decision (Diamond): Asks a true/false question to determine the next step. Must have at least two outgoing flow lines (e.g., 'Yes' and 'No').
Flow Line (Arrow): Connects symbols and shows the direction of execution.
Pseudocode: Structuring Logic with Words
Pseudocode is a structured, text-based way of describing an algorithm. It uses keywords similar to those in programming languages but without the strict syntax rules. This allows you to focus purely on the logic. The IB has an approved notation, which you should aim to use in exams for clarity. It includes keywords for input/output, selection, and iteration.
Assignment: (e.g., )
Input/Output: INPUT variable, OUTPUT variable or OUTPUT "message"
Selection: IF condition THEN ... ELSE ... ENDIF
Indefinite Iteration: WHILE condition DO ... ENDWHILE
Definite Iteration:
In exams, clarity is king. Whether you use a flowchart or pseudocode, ensure your logic is easy to follow. For flowcharts, use a ruler and standard symbols. For pseudocode, use indentation to show the structure of loops and conditional statements. You won't lose marks for minor syntax errors in pseudocode, but you will if the logic is flawed.
Choosing Between Flowcharts and Pseudocode
The choice between a flowchart and pseudocode often depends on the problem and the audience. Flowcharts are excellent for explaining logic to non-programmers or for visualising complex branching. Pseudocode is often faster to write and easier to convert into actual code, making it a favourite among developers for detailed planning.
Worked examples
See the formulas applied — reveal one step at a time, like the exam.
A program needs to read an integer, age. If the age is 18 or greater, it should output "Adult". Otherwise, it should output "Minor". Construct a flowchart for this algorithm.
- 1
Start: The flowchart begins with a 'Start' terminator (oval).
Write a pseudocode algorithm that finds the largest number in a list of 5 pre-defined positive integers: [12, 45, 8, 23, 30].
- 1
numbers = [12, 45, 8, 23, 30] largest = numbers[0]
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.
- ✓
Input/Output (Parallelogram): Used for getting data from a user (INPUT) or displaying results (OUTPUT).
- ✓
Process (Rectangle): Represents any calculation, assignment, or data manipulation (e.g., ).
- ✓
Decision (Diamond): Asks a true/false question to determine the next step. Must have at least two outgoing flow lines (e.g., 'Yes' and 'No').
- ✓
Flow Line (Arrow): Connects symbols and shows the direction of execution.
Practice — then mark it
The whole point: a real Cambridge question, marked mark-by-mark.
Test Your Algorithm Design Skills
Test Your Algorithm Design Skills
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 Algorithm Design Skills on paper, snap a photo, and get examiner-style feedback on exactly where you win and lose marks.