Created
October 7, 2012 10:03
-
-
Save rvbsanjose/3847737 to your computer and use it in GitHub Desktop.
Deaf Grandma
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
def deaf_grandma | |
returns = 0 | |
until returns == 2 | |
print "Say something to grandma: " | |
response = gets.chomp | |
if response.empty? | |
returns += 1 | |
elsif response.match(/[A-Z]/) | |
puts "NO, NOT SINCE 1938!" | |
else | |
puts "HUH?! SPEAK UP, SONNY!" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment