first attempt at Q2
completed excercise2.rb question2