From: Joseph Pecoraro Date: 2007-12-16T15:26:12+09:00 Subject: Re: How t owrite an OR statement > while again != "y" or "n" > > puts "Would you like to enter a number again? y/n" > > end 1) The logic here has two parts, two sides of the or. again != "y" #=> false "n" #=> true because "n" his is not nil So "false or true" will always be true. 2) Inside your while loop you never let the user reinput. You need to add: again = gets.chomp.downcase Any of my above suggestions should work for the logic portion. Here is an example, replace the above three lines with these four: until again == "y" or again == "n" do puts "Would you like to enter a number again? y/n" again = gets.chomp.downcase end -- Posted via http://www.ruby-forum.com/.