programming exercises in Ruby