CP310 Homework 312