hw6_solution1.py