Skip to content

Instantly share code, notes, and snippets.

@MichaelSwartz
Created December 30, 2014 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MichaelSwartz/fe7ac413bfb90df0466e to your computer and use it in GitHub Desktop.
Save MichaelSwartz/fe7ac413bfb90df0466e to your computer and use it in GitHub Desktop.
Deaf Grandma
puts "Say hello to your grandmother."
bye_counter = 0
while bye_counter < 3
input = gets.chomp
if ((input != input.upcase) && (input != "BYE"))
puts "HUH?! SPEAK UP, SONNY!"
bye_counter = 0
elsif input == "BYE"
puts "WHAT?!"
bye_counter += 1
else
puts "NO, NOT SINCE #{rand(21) + 1930}!"
bye_counter = 0
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment