Code from Learn to Program by Chris Pines