Added exercise4.rb