Adding midterm

This is a reddit submission for the midterm.