Introduction to computer Programming (using Python)

Michael Williams
29th June, 2005 (with minor updates 11th January, 2009)

An introduction to computer programming using Python. Suitable for all ages, but some of the exercises assume high school/secondary school maths.

You are free to modify or distribute the text under the terms of the DSL. This website is no longer actively maintained. I welcome questions and comments, although I should warn you that I’m out of the Python loop, and you’ll probably get a quicker and more useful reply from the appropriate mailing list. If you’re stuck with a Python programming problem, tutor is the list for you, while EDU-sig is for discussion of teaching techniques, usually specific to Python.


The above notes are the result of a Masters project to assess the suitability of Python as a language to teach computer programming. The victims were a group of physics undergraduates at the University of Oxford. An overview of the project is provided by this article, which appeared in issue 3 of Pyzine.

The handbook is designed to be used by students as a textbook. It has much local information (in particular chapter 1 and some of chapter 2) which is probably of no interest. Chapter 3 and chapter 4 are generally applicable and form an introduction to procedural programming. The handbook assumes no programming experience but does assume some mathematical aptitude. It is probably suitable for secondary/high school and above.

The report was submitted as my Masters dissertation in 2002. It’s very badly written and I stand by almost none of the statements I make in it, but it may be useful to someone.