solved prac2 problem1.10