hw1 in python