homework number 3 for the UCSC extension class