Created
December 17, 2013 16:51
-
-
Save ruslanpa/8008195 to your computer and use it in GitHub Desktop.
Deaf grandma task
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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