On Fri, Sep 7, 2012 at 10:18 AM, Mattias A. <[email protected]> wrote:
> Hi guys!
>
> I am new to programing and need some help. I have decided to try doing a
> "Guess the random number" program. When i try to run below its fails on
> keyword_else? But i dont understand why, can some body help me? Thanks
> in advance.
>
>
> print "Guess a number between 0-10\n"
>
> puts "Enter your guess:"
> GuessNumber = gets.to_i
>
> Number = rand(10)
>
> If GuessNumber < Number then
> puts "Too Loo"
> else
> puts "Too High"
> end

The control flow word is spelled "if".

Kind regards

robert


-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

-- You received this message because you are subscribed to the Google Groups 
ruby-talk-google group. To post to this group, send email to 
[email protected]. To unsubscribe from this group, send email 
to [email protected]. For more options, visit this 
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en

Reply via email to