Skip to content

Instantly share code, notes, and snippets.

@ianng89
Forked from nextacademy-private/deaf_aunty.rb
Last active November 30, 2015 04:16
Show Gist options
  • Select an option

  • Save ianng89/f5956ac9c748d1cb270f to your computer and use it in GitHub Desktop.

Select an option

Save ianng89/f5956ac9c748d1cb270f to your computer and use it in GitHub Desktop.
=begin
1) Get user input
2) If user input is not in capital, return "HUH?! SPEAK UP, SANDRA!"
3) Elsif return "NO, WE CAN'T DO THAT!"
4) If user returns "I love ya, aunty, but I've got to go."
=end
puts "A wild aunty appeared! Say something!"
user_input = gets.chomp
# loop do
until user_input == "I love ya, aunty, but I've got to go."
if user_input != user_input.upcase
puts "HUH?! SPEAK UP, SANDRA!"
elsif user_input == ""
user_input = gets.chomp
if user_input == ""
break
end
else
puts "NO, WE CAN'T DO THAT!"
end
user_input = gets.chomp
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment