Coding exercises in Ruby