Homework and exam code from Udacity's CS212