Gabe Boyer wrote: >> Although I'd have to point out that 'ask' is an awful name for a method. > > I'd say that depends entirely on context. In a context like Hackety > Hack, I think it's a perfectly good name. > > -Gabriel Boyer humm ok so i tried out my *program* but at the very end i get an error.. irb(main):001:0> def ask(question) irb(main):002:1> puts "#{question}:\n" irb(main):003:1> gets.split irb(main):004:1> end => nil irb(main):005:0> Var_1 = ask("Enter 1st Vendors prices") Enter 1st Vendors prices: 14.50 16.50 14 => ["14.50", "16.50", "14"] irb(main):006:0> Var_2 = ask("Enter 2nd vendors prices") Enter 2nd vendors prices: 13 17.50 14 => ["13", "17.50", "14"] irb(main):007:0> Var_1.zip(Var_2) => [["14.50", "13"], ["16.50", "17.50"], ["14", "14"]] irb(main):008:0> Var_1.zip(Var_2).map{ |pair| pair[0] - pair[1] } NoMethodError: undefined method `-' for "14.50":String from (irb):8 from (irb):8:in `map' from (irb):8 from :0 irb(main):009:0> could it because im using floats, and not intergers? -- Posted via http://www.ruby-forum.com/.