Solution of Assignment 2