AlgoPath Python · Book 3

Python GCSE AdvancedAlgorithms and independent projects

Compare searching and sorting algorithms, organise records, explore recursion and build tested projects.

By AlgoPath Coding Academy
First edition, 2026 · 14 chapters

Python GCSE Advanced: Algorithms and independent projects — front cover

Who this book is for

Confident Python learners who want to compare algorithms, organise records and work more independently.

Before you begin

Practise functions, lists, searches and nested loops first. Python GCSE Core is the preceding book in this series.

Includes enrichment such as recursion alongside GCSE programming practice. The title does not mean that every topic is required by every GCSE board.

Inside the book

Learning themes across 14 chapters

  1. Comparing searching algorithms
  2. Tracing and testing sorting algorithms
  3. Organising records with dictionaries
  4. Exploring recursion
  5. Choosing and explaining an approach
  6. Building and testing independent projects

Work through explanations and examples, try the independent practice, then use the explained answers to review your reasoning.

Try the approach

Count repeated values with a dictionary

A dictionary can connect each value to a running count. Trace the count after each pass through the loop.

counts = {}
for colour in ['blue', 'gold', 'blue']:
    counts[colour] = counts.get(colour, 0) + 1
print(counts['blue'])
print(counts['gold'])

What it prints

2
1

get(colour, 0) starts a new count at zero. Each occurrence adds one. The dictionary stores the result for each colour separately.

This short public example introduces an idea explored in the book.