programming exercises for week 3