some solutions to selected problems from the book thinkpython