Created
April 1, 2013 23:55
-
-
Save KristineHines/5288803 to your computer and use it in GitHub Desktop.
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 | |
puts "Talk to me, sonny!" | |
response = gets.chomp | |
empty_line = 0 | |
until response == "I love ya, Grandma" | |
if response == "" | |
empty_line += 1 | |
break if empty_line == 2 | |
elsif response != response.upcase | |
empty_line = 0 | |
puts "HUH?! SPEAK UP, SONNY!" | |
else | |
empty_line = 0 | |
puts "NO, NOT SINCE 1983" | |
end | |
response = gets.chomp | |
end | |
end | |
deaf_grandma | |
def deaf_grandma_crazy | |
puts "Would you like some vanilla wafers?" | |
response = gets.chomp | |
until response == "YES" | |
if response == "YES" | |
puts "I NEED TO FATTEN YOU UP SONNY!" | |
elsif response.downcase == "no" | |
puts "FINE I WILL EAT THEM ALL MYSELF" | |
elsif response == "yes" | |
puts "You don't want these enough, I'm keeping it for myself!" | |
else | |
puts "Are you on a diet?" | |
end | |
response = gets.chomp | |
end | |
end | |
deaf_grandma_crazy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment