From: houston barnett-gearhart Date: 2008-07-30T06:51:10+09:00 Subject: Re: deaf grandma. > There's a problem with your code as written - note that once you've > said "bye" you can never say anything else - it sticks in the loop > till it counts three 'byes' in a row. Whereas what you want is to exit > the whole loop if you see three byes in a row, otherwise just carry on > as normal. What you *should* do is this - > > if the user has yelled, so that granny hears what he says, do an > additional check for his having said "bye". > ---- If that is true, then increase the bye count. > -------- If the bye count is 3, exit the loop > ---- If that is false, reset the bye count to zero and carry on with > the rest of the code Martin, this keeps being brought up. If I'm understanding correctly, after the Intermediary explains that questions towards Granny should be in all caps if you want her to hear you, you want to additionally check the inputted text (if it's in all caps) to check if "BYE" has been said. But, logically that doesn't make any sense. Why would the first thing you say to Granny, after it's been suggested you ask a question, be "BYE"? It doesn't make sense to me.. which is why I believe I put the loop where it lays currently. Of course, I could be completely misunderstanding what you're saying. Which is more likely! If I am, just clarify & I'll begin working on what you've been trying to say. At it's written, it works as I want it to. It is still heavily rooted in Chris Pine's exercise & covers most, if not all, of the requirements. The one thing that I believe is most significant is the loop issue, which I hope to have sorted out later today if all goes well. >If you let us know what platform you are on, people can recommend their >favourite editors and IDEs I'm on Windows XP. Recommend away! -- Posted via http://www.ruby-forum.com/.