Part 2 of homework w3