added exercise3.rb
added changes to exercise3.rb
added exercise4.rb file
made changes to exercise4.rb