Homework Assignment 7, with writeup for Assignment 6 Part E included in addition to code