Homework 2 (2nd Commit-Revised Version)

Revised version of homework 2.