Skip to content

Instantly share code, notes, and snippets.

@presto2116
Last active August 29, 2015 14:17
Show Gist options
  • Save presto2116/f01c35bfd80dc5e2639a to your computer and use it in GitHub Desktop.
Save presto2116/f01c35bfd80dc5e2639a to your computer and use it in GitHub Desktop.
Preston_Homework 3_17
puts("Hello, I am C-3P0, human-cyborg relations.")
puts("What's your name?")
user_name = gets.chomp.to_s
puts("It's a pleasure to meet you, #{user_name}. Have you ever met a protocol droid before?")
droid_meet = gets.chomp.to_s
puts("#{droid_meet}? How interesting, for someone from around these parts.")
puts("I'm terribly sorry for prying, but you don't by any chance go by the alias of Obi-Wan Kenobi, do you? (Answer 'I do' or 'I don't')")
obi_wan = gets.chomp.to_s
if (obi_wan == "I do") || (obi_wan == "i do") || (obi_wan == "I DO") || (obi_wan == "i Do")
puts("Oh, marvelous! Simply marvelous! Say hello to R2-D2; he's been looking all over for you.")
else
puts("I've really enjoyed speaking with you, #{user_name}, but if you'll please excuse me, I have to help my friend find someone named Obi-Wan Kenobi.")
puts("On this planet, how do you say farewell?")
fav_farewell = gets.chomp.to_s
puts("#{fav_farewell} to you too.")
puts("Well R2, I suppose we'll just have to keep looking.")
puts("R2-D2: (Agreeable droid noises)")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment