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