homework 3 for python