From: Jason Morgan Date: 2009-02-18T15:39:38+09:00 Subject: Re: deaf grandma. I've been reading Chris Pine's book the last couple of days. I spent most the day today stuck on this deaf Grandma thing. This is what i finally came up with hope it helps; count = 1 while count != 4 response = gets.chomp if response == 'BYE' count = count + 1 else count = 1 end if response == response.upcase && response != 'BYE' puts 'Just like in ' + (rand(30) + 1920).to_s end if response == response.downcase puts 'HUH?! SPEAK UP, SONNY!' end end -- Posted via http://www.ruby-forum.com/.