CSC161 Supplemental Problem 4 Code