Solution to the assignment in the week 4