The following are taken from Chapter 5 of How to Think Like a Computer Scientist: Learning with Python 3 by
Peter Wentworth, Jeffrey Elkner, Allen B. Downey, and Chris Meyers. From the Open Book Project. Continues on the next page … Continues on the next page …