Skip to content

Instantly share code, notes, and snippets.

@weipee
Forked from nextacademy-private/deaf_aunty.rb
Last active August 29, 2015 14:14
Show Gist options
  • Select an option

  • Save weipee/96fca925d3d0e7b09d4d to your computer and use it in GitHub Desktop.

Select an option

Save weipee/96fca925d3d0e7b09d4d to your computer and use it in GitHub Desktop.
# Save this file to your computer so you can run it
# via the command line (Terminal) like so:
# $ ruby deaf_aunty.rb
#
# Your method should wait for user input, which corresponds
# to you saying something to your Aunty.
# You'll probably want to write other methods, but this
# encapsulates the core Aunty logic
def deaf_aunty
puts "Say something to Aunty!"
me = gets
puts me.inspect
puts "hello" + me
# puts "Say goodbye to aunty!"
# me2 = gets.chomp
while me != "I love ya, aunty, but I've got to go."
if me == me.upcase
puts "NO, WE CAN'T DO THAT!"
else
puts "HUH?! SPEAK UP, SANDRA!"
end
puts "Say goodbye to aunty!"
me = gets.chomp
break if me == "I love ya, aunty, but I've got to go."
# else me2 = gets.chomp
end
end
# Run our method
deaf_aunty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment