Update a2.py

Finished Coursera HW 2