< Prev  |  Home  |  Next >

Python Algorithms

Python Code Visualizer

From pythontutor.com. This link allows you to enter a Python program and see it running line by line, with a visual list of variables and their values. Very useful for debugging programs, and includes some nice examples.

Python code visualizer

Example Programs

Below are a number of Python algorithms. Click ‘Visualize Execution’ to step through the programs.

Array examples:

Vending machine coin reset program

Vending machine coin totals program

Printing names in a list

Searching algorithms:

Find a value in a list — the long way – the short way

Binary search — Using indices – Using left/right sub-lists

Sorting algorithms:

Bubble sort

Progress Spreadsheets

Student progress spreadsheet

Use this spreadsheet to track student progress during a particular challenge or task. Display these spreadsheets on an interactive whiteboard so that students can record their own progress by simply pressing their computer on the seating plan!


The spreadsheet also includes sheets to ask and record student answers to questions during the lesson, displaying class reactions to questions as a chart. Great for starters and plenaries.

Question spreadsheet


< Prev  |  Home  |  Next >