Here is code for today's lecture (you can expect to be able to tackle the first 10 exercises given the material we cover today).
If you'd like to do some extra reading on the topic covered in today's class and in the next two classes, consider the following chapter from the book Think Python: