Skip to content

Instantly share code, notes, and snippets.

@ruslanpa
Created December 17, 2013 16:51
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 ruslanpa/8008195 to your computer and use it in GitHub Desktop.
Save ruslanpa/8008195 to your computer and use it in GitHub Desktop.
Deaf grandma task
# Deaf Grandma
puts "Hey Sonny! It's your lovely Grandmother! How are you?"
while (response = gets.chomp) != 'BYE'
puts "Huh?! I CAN'T HEAR YOU!" if response != response.upcase
puts 'NO! NOT SINCE 19' << (rand(30..50)).to_s if response == response.upcase
end
puts 'GOOD BYE, SONNY!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment