Year 7 Digital Technologies · Creating Digital Solutions · 9m read
Algorithms — Planning Step-by-Step Solutions
Ever wondered how your phone knows exactly what to show you next, or how a video game character decides where to move? That's an algorithm at work—basically a set of clear, step-by-step instructions that solve a problem. Learning to design algorithms using pseudocode (plain English-style instructions) and flowcharts (visual maps) is like sketching out your solution before you build it. This skill is essential for coding, and it's how real programmers tackle everything from apps to artificial intelligence.
Learning objective: Design and represent algorithms using pseudocode and flowcharts.
By the end of this lesson you can:
- I define an algorithm and explain its properties.
- I write pseudocode for simple algorithms.
- I draw a flowchart using correct symbols.
Algorithms are recipes. A recipe lists exact steps in order. Miss one and the cake flops. Algorithms are recipes computers follow precisely.
Algorithms — design and representation
ALGORITHM: a finite, ordered set of instructions to solve a problem.
Properties of a GOOD algorithm:
• FINITE: must end.
• UNAMBIGUOUS: each step must be clear — no guessing.
• EFFECTIVE: each step must be achievable.
• CORRECT: produces the right output for all valid inputs.
REPRESENTING ALGORITHMS:
1. PSEUDOCODE: structured English that resembles code.
Uses: INPUT, OUTPUT, IF/ELSE, WHILE, FOR
Example (calculate average):
INPUT num1, num2, num3
total ← num1 + num2 + num3
average ← total / 3
OUTPUT average
2. FLOWCHARTS: visual diagram.
Symbols:
OVAL/ROUNDED RECTANGLE: Start / End (terminator).
RECTANGLE: Process (action, calculation).
DIAMOND: Decision (yes/no question → two branches).
PARALLELOGRAM: Input / Output.
ARROWS: flow of control.
CONTROL STRUCTURES:
SEQUENCE: steps one after another.
SELECTION (IF/ELSE): branch based on a condition.
IF age ≥ 18 THEN output "adult" ELSE output "minor"
ITERATION (LOOP): repeat steps.
WHILE count < 10 DO count ← count + 1
Algorithm design rules
- One entry, one exit: Good algorithms (and flowcharts) have ONE start point and ONE or more defined end points.
- Decision = diamond: Every IF statement in pseudocode maps to a DIAMOND in a flowchart with YES and NO branches.
- Test with examples: Trace through your algorithm with specific input values to verify it produces the correct output before coding.
Quick reference
| Tool | Use |
|---|---|
| Steps | Clear, ordered instructions |
| Flowchart | Diagram of steps and decisions |
| Pseudocode | Plain-language code |
| Sequence | Steps in order |
| Selection | IF decisions |
| Iteration | Loops/repeats |
Worked example (Medium)
Write pseudocode for: "Read a number. If it is greater than 100, print LARGE. Otherwise, print SMALL."
- Input. INPUT number
- Decision. IF number > 100 THEN
- True branch. OUTPUT "LARGE"
- False branch. ELSE OUTPUT "SMALL" END IF
Answer: INPUT number IF number > 100 THEN OUTPUT "LARGE" ELSE OUTPUT "SMALL" END IF
Worked example (Hard)
Apply your understanding of algorithms — planning step-by-step solutions to analyse a complex real-world scenario, demonstrating integration of key concepts.
- Identify key concepts. Break down the scenario to identify which specific concepts from this topic are relevant and how they interact.
- Apply knowledge systematically. Use precise terminology and frameworks from this topic to analyse each aspect of the scenario.
- Evaluate and connect. Consider broader implications and connections to other topics you have studied.
- Synthesise conclusion. Draw your analysis together into a coherent, evidence-based conclusion.
Answer: Analysis demonstrates integration of multiple concepts with specific terminology and systematic reasoning applied to a real-world context.
Common mistakes
- Providing surface-level answers without depth Students state facts without explaining underlying mechanisms or reasoning. Fix: Always explain WHY and HOW, not just WHAT. Go beyond naming to explaining the mechanism or process.
- Not using specific terminology Students use everyday language when subject-specific terms are expected and demonstrate understanding. Fix: Use precise subject vocabulary — this demonstrates understanding and earns marks in assessments. Build a glossary of key terms.
Connecting concepts — how this topic links to the bigger picture
Every topic you study exists within a larger network of connected ideas. Understanding these connections transforms isolated facts into integrated knowledge — the kind of understanding that enables you to solve new problems, not just recall memorised answers.
Experts in any field think in terms of conceptual frameworks — organised structures of related ideas. When a doctor sees a patient, they don't recall every fact from medical school; they activate a framework of connected concepts that narrows possibilities efficiently.
Building these frameworks requires active learning: asking how each new concept relates to what you already know, looking for patterns across topics, and practising applying knowledge to unfamiliar situations. The goal is not to memorise more facts but to build richer connections between facts. Practice questions that require application to new contexts are valuable because they force you to build the connections that define genuine understanding.
Practice questions
Which flowchart symbol represents a DECISION (yes/no branch)?
- Rectangle
- Oval
- Diamond
- Parallelogram
(1 marks)
Write pseudocode for a program that asks for a student's test score and outputs "Pass" if it is 50 or above, "Fail" if below 50.
(3 marks)
Summary
- Define an algorithm and explain its properties.
- Write pseudocode for simple algorithms.
- Draw a flowchart using correct symbols.