From: Blake Atl Date: 2010-11-23T03:06:37+09:00 Subject: Re: help with simple game Andrew Wagner wrote in post #963161: > This sounds more like a homework problem, but I'll give you the benefit > of > the doubt. > > You can start with something like this: > > CARS = { > 'mustang' => [300.0, 3480], > 'camaro' => [300.0, 3780] > } > > car1,car2 = ARGV > > def compare car1, car2 > ratio1 = ratio car1 > ratio2 = ratio car2 > > ratio1 >= ratio2 ? car1 : car2 > end > > def ratio car > CARS[car][0] / CARS[car][1] > end > > puts compare car1, car2 allrite allrite, how do i insert this in an interactive ruby window? where do i go to build this code? im actually interning at a communications company -- Posted via http://www.ruby-forum.com/.