Homework 1

I spent the whole day figuring this out....