Make 001 more Pythonic.
Make the solution for Problem 003 rather efficient.