Completed Chapter 7

Code for the silver challenge in Chapter 7. (Note: this chapter only
has a silver-level challenge.)