I want to exit only after I say
'BYE' three consecutive times. It is about a deaf grandma who will only hear things if the letters are all in caps.
I tried having three different variables, but that did not work. My code is below and it works when I say
'BYE' only once.
whatSaid = 'Hi!' while (whatSaid != 'BYE') whatSaid = gets.chomp if (whatSaid == 'BYE') puts 'FINE! LEAVE YOUR POOR GRANDMA TO DIE.' else if (whatSaid == whatSaid.upcase) puts 'NO, NOT SINCE ' + rand(1930...1951).to_s + '!' else puts 'HUH!? SPEAK UP, SONNY!' end end end