week-9 problem-7 solved.