Code from the end of Week 6 in class work.