Assignment Solution

Wrote comments and code for assignment solution