Some exercises from Chapter 9 of "Python Programming: An Introduction to Computer Science"