Added homework 2, python implementation.