Skip to content

Instantly share code, notes, and snippets.

@kkchu791
Last active March 18, 2016 00:16
Show Gist options
  • Save kkchu791/ff55e38ad7769a13eb21 to your computer and use it in GitHub Desktop.
Save kkchu791/ff55e38ad7769a13eb21 to your computer and use it in GitHub Desktop.
counter = 0
puts "Say something to grandma:"
while counter < 1
say = gets.chomp
if say == "BYE"
puts "LEAVING ALREADY? WELL GOODBYE!"
counter += 1
elsif say == say.upcase
random_year = rand(1930..1950)
puts "NO, NOT SINCE #{random_year}!"
else
puts "HUH?! SPEAK UP, SONNY!"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment