hw1.py completed.