From: Dark Ambient Date: 2006-06-25T22:32:40+09:00 Subject: Stumped:beginners question I'm having a hard time with both getting my branching correct as well as my loop. In this little program, the survey taker asks expecting a "yes" or "no" (currently not working correctly). If any other response is given, then the survey taken says..please answer with yes or no... I commented out the return at the end since I'm not even sure what that's doing. TIA Stuart $stdout.sync = true def ask question reply = nil while (not reply) puts question reply = gets.chomp.downcase if (reply !='yes' || reply != 'no' ) puts ' Please answer "yes" or "no".' elsif reply == 'yes' reply = true else reply == 'no' reply = false end end end #reply # This is what we return (true or false). #end