Chapter exercises for Think Python by Allen Downey