Run Python
Write and run code in your browser. Load an example, predict the output, then change it and run it again.
Open Python playground →Watch an algorithm, try it in Python, or check your understanding with review questions.
Lessons explain each topic. Handouts contain the class exercises. Use this page to explore and revise.
Write and run code in your browser. Load an example, predict the output, then change it and run it again.
Open Python playground →Step through an algorithm with its Python code beside it. Pause before each line and predict what changes.
Open the animations ↓Find textbook pages, worked examples and review questions for efficiency, searching, sorting and HL recursion.
Open reading & review →Compare neighbours, swap them when needed, and watch the largest remaining value reach its place.
Open bubble sort →Find the smallest remaining value and move it to the front of the unsorted section.
Open selection sort →Follow low, mid and high as each comparison rules out half of a sorted list.
Open binary search →Compare how work grows, then separate input storage from extra working memory.
Trace a search from the first comparison to the returned index.
Watch comparisons, swaps and the growing sorted section.
Trace a simple recursive function, then explore branching applications conceptually.
For HL recursion, practise writing and tracing simple non-branching functions. Quicksort, tree traversal and fractals show applications to explore.