Homework 2 for AMCS 252 class