practice exercises from Chris Pine's Learn to Program in Ruby book