Added exercise3.rb and exercise4.rb