got some of python part of homework1 working