Computational Thinking Challenge

advanced40 min

Learning objectives

  • Apply abstraction, decomposition, pattern recognition and algorithmic thinking
  • Justify design decisions
  • Evaluate and refine a computational solution

Learn

Consolidating Sequence 6: Computational Thinking

Retrieval: this lesson deliberately draws on all four skills from this sequence — abstraction (Introduction to Computational Thinking), decomposition, pattern recognition and algorithmic thinking — plus the evaluation skill from the previous lesson. There's no new concept here: the point is applying everything together, in the right order, on a problem of meaningful size.

The order matters

A common mistake at this stage is jumping straight into writing code before doing any of the earlier thinking. This lesson deliberately requires the opposite: plan before you code.

  1. Abstract — decide what actually matters for your chosen problem, and what can be ignored.
  2. Decompose — break the problem into sub-tasks small enough to design individually.
  3. Check for patterns — does any sub-task resemble something you've already solved elsewhere in this course?
  4. Design algorithmically — work out the logic for each sub-task, including constraints and edge cases, before writing Python.
  5. Build and evaluate — implement it, then evaluate your own solution against the framework from the previous lesson.

Choose one project brief

Option A — Simple Booking System. A program that lets a user book one of a fixed number of slots (e.g. appointment times), preventing double-booking, and lets a booking be cancelled to free the slot again.

Option B — Basic Inventory Tracker. A program that tracks stock levels for a small number of named items, supports adding stock, removing stock (never allowing it to go negative), and reports which items are running low.

Worked example — decomposing and pattern-matching Option A before coding

Decomposition: "check availability," "make a booking," "cancel a booking," "report free slots." Pattern check: "check availability" is structurally the same pattern as the car park barrier's "is there space?" check from Algorithmic Thinking — recognising that means you already know roughly how to design it, rather than starting from nothing.

Practical task

Working through the five steps above, plan and then implement your chosen option. Your planning (even brief notes) should be visible before your code — a decomposition list, a note on any pattern you recognised, and the key logic for the trickiest sub-task (double-booking prevention, or never letting stock go negative).

Common mistake

Treating this as "just write a program" rather than "apply the five-step process." A working program that skipped the planning steps hasn't actually demonstrated computational thinking, even if it happens to run correctly — the whole point of this lesson is showing your working, not just your output.

Coding challenge — a focused version

The full booking system or inventory tracker is a genuinely open-ended project; the linked coding challenge below is a smaller, auto-gradable exercise built from the same "decompose into sub-functions, then combine" pattern, so you can practise and demonstrate that specific skill directly.

Evaluate it

Once your chosen option works, evaluate it against the four-criteria framework from the previous lesson, and identify one genuine improvement you'd make with more time.

Looking ahead: Sequence 7 (Data Representation) returns to a very different kind of content — but the underlying habit from this sequence, plan and decompose before you build, applies just as much there, and to the NEA project in Year 13, as it does here.

Practise

Apply what you've just learned in the Coding Lab.

Open Coding Lab
Log in to track this lesson on your progress dashboard.
Log in