A simple program using branching to guess the answer As a rookie to programming, i'm really excited about finishing my first program.

But I know I only learn by making mistakes and through constructive criticism. 

I'm open to any feedback regarding my use of branching, and any way to "clean up" my code.

puts 'Hi! Pick a number between 0 and 10'
number = gets.chomp
puts 'Got it; your number is ' + number.to_s + ', right?'
check1 = gets.chomp

if
  check1 == 'yes'
  puts 'awesome. now double your number. What\'s your new number?'
else
  puts 'Oops. Either: A. I oopsie-daisied up or B. you\'re lying.'
end

number_doubled = gets.chomp
if
  number_doubled.to_i == number.to_i * 2
  puts 'cool. Now add 6. What\'s the new number?'
else
  puts 'Oopsie-daisies'
end

number_plus_6 = gets.chomp
if
  number_plus_6.to_i == number.to_i * 2 + 6
  puts 'cool; Now divide your new answer by 2; What\'s your new number?'
else
  puts 'Oopsie-daisies'
end

number_halved = gets.chomp
if
  number_halved.to_i == number_plus_6.to_i / 2
  puts 'cool. Now, if you subtract the number you originally picked, ' + number + ', you\'re answer will be 3. Is it?'
else
  puts 'Oopsie-daisies'
end

check2 = gets.chomp
if
  check2 == 'yes'
  puts 'See? I told you i was a smarty!!'
else
  puts 'hmm, i think you\'re bad at math'
end
I think in general this is fine. The only things I'd point out are stylistic really.


In Ruby, many people would prefer double-quoted strings, which allow you to: Got it; your number is #{number}, right?. Note that this also relies on an implicit #to_s on number. It also allows single quotes to be used without escaping. 
Look out for variable naming. Naming things correctly is notoriously hard, even after years of experience, and number is a bit generic.
I would definitely put the if conditional on the same line as the if. If the expression is too long or a bit difficult to instinctively understand, assign its value to a variable with a meaningful name (e.g. correctly_added_six = number_plus_6.to_i == number.to_i * 2 + 6) so your condition is more easily understood (e.g. if correctly_added_six)


Good start, though!