Ruby Exercise from Chris Pine's "Learn to Program" book