RUBY Help

2Tie 29 Mar 2009 22:21

i need help! my little brother made this in ruby, and it's havig major issues:

puts "1 = Play the game. 2 = Exit" one_or_two = gets if one_or_two == "1" puts "How many digits of pi?" digits = gets if digits <= "2" puts "Number too low!" end if digits >= "12" puts "Number too high!" end if digits == "3" puts "3.14" end if digits == "4" puts "3.142" end if digits == "5" puts "3.1416" end if digits == "6" puts "3.14159" end if digits == "7" puts "3.141593" end if digits == "8" puts "3.1415927" end if digits == "9" puts "3.14159265" end if digits == "10" puts "3.141592654" end if digits == "11" puts "3.1415926536" end if digits == "12" puts "3.14159265359" end end if one_or_two == "2" puts "Goodbye!" end

whenever you execute it, it gets to the first comparison, then epically fails. if you put in "puts one_or_two" at the very end, it dsplays what you think yo put into that variable, but the comparison isn't working. on my father's computer it even says goodbye no matter what you put in. for me, that's not even happening. HELP!