updated HW1.py