python hw2. half done