From: "Jesús Gabriel y Galán" Date: 2009-08-15T06:44:26+09:00 Subject: Re: New to ruby - how can I take this further? On Fri, Aug 14, 2009 at 6:25 PM, Fabian Streitel wrote: > just some more suggestions: > > puts "Please enter your name:" >> first_name = gets.chomp >> >> number1 = rand(100) >> number2 = rand(100) >> >> # I'd use symbols for the operators >> # also note the snake_case convention >> operator_array = [:+, :-] > > > I personally prefer %w: > > operator_array = %w{+ -} > > Especially when you get more entries, %w helps you save time and maintain > readability. I use %w a lot, when I want Strings. In this case though, my preference is to use symbols, because they represent better what they are used for in this program. >>  puts "Incorrect. The answer is " + "#{answer}" > you missed one! :-) Yep, good catch :-) Cheers, Jesus.