From: Steve Rees Date: 2010-11-11T07:16:15+09:00 Subject: Re: help with code, new to programming > initialise = gets > reply='yes' > > while reply=='yes' > matches = ask 'I am thinking of a number between 1 and 10, can you > guess what it is?' > puts 'As to the question of you being psychic the answer is:' > puts matches > puts 'Would you like to play again? (please answer yes or no' > reply = gets.chomp This makes sense! By setting the first reply as 'yes' you begin the loop, it is then up to the user to continue the loop by choosing whether or not 'reply' is still yes or not. steve -- Posted via http://www.ruby-forum.com/.