From: "Thought M." Date: 2012-04-27T12:27:44+09:00 Subject: Re: Deaf Grandma Program doesn't work right I just had a go with this and tried for at least an hour before getting here. I read a few responses and gave it another go, read some more and finally got it. It looks a lot like the previous post but a little change here or there, not much though. I noticed my "rand" part with the dates is different from everyone elses but it works just how i imagined it too. And the assigning of response I picked up from aother person that made it easier for me to understand is tucked nicly inside the first action as to include it in the looping effect. puts 'Hi Sweety, it\'s Grandma!' bye = 0 while bye < 3 if ((response = gets.chomp) == "BYE") puts "GOOD BYE, SONNY!" bye = (bye+1) end if (response != response.upcase) puts 'HUH?! SPEAK UP, SONNY!' bye = 0 end if (response == response.upcase and response != "BYE") puts 'NO, NOT SINCE '+(rand(1930..1951)).to_s+'!' bye = 0 end end This sure was a tough one without knowing bout all the functions you needed to know. There was a lot left to imagination, like the thing that pushed my RUBY into being finished was the "AND" function in my 3rd if statement. When ever I would type "BYE" it would also tell me "NO, NOT SINCE 19xx! and then also GOOD BYE SONNY!..... I just couldn't figure out how to exclude something from the "puts" and it also would make the bye value set to 0 when it used both responses cause I set it so if "BYE" wasn't used it would reset the value of "BYE" back to zero. All in all this excerise was almost easy enough to do it without help or hints but not quite. Made me want to know though and pushed me to try really hard but I just feel with the info adding up to the "TRY IT OUT" part in the pickaxe just didn't stick well enough or just didn't have the parts told to you yet? Might just be me but I definately struggled. -- Posted via http://www.ruby-forum.com/.