adding code,image snapshot and explanation for Q1 of exercise set2 in chapter 1