Code for exercise2
Code for exercise2