Update hw1.py

This is better.