guess = 10000 puts 'Guess a number from 0 to 50!' number = rand(50) while guess > 0 guess = gets.to_i if guess == number puts 'Great job! You guessed the number!' abort elsif guess > number puts 'That is not the right number.' puts 'Try again, with a LOWER number' elsif guess < number puts 'That is not the right number.' puts 'Try again, with a HIGHER number' end end