Skip to content

Instantly share code, notes, and snippets.

@AliTopal89
Created March 17, 2015 21:46
Show Gist options
  • Save AliTopal89/eccd07fa9a756f9de2bc to your computer and use it in GitHub Desktop.
Save AliTopal89/eccd07fa9a756f9de2bc to your computer and use it in GitHub Desktop.
obi wan
puts(" Hi I'm C-3P0, human-cyborg relations." " What is your name? ")
name = gets().chomp()
puts("It is a pleasure to meet you, #{name}. Have you ever met a protocol droid before?")
user_answer = gets().chomp()
puts("#{user_answer}? 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')")
user_answer = gets().chomp()
if user_answer == "I do" || user_answer == "i do" || user_answer == "I DO" || user_answer == "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 #{name} but if you'll please excuse me, I have to help my friend find someone named Obi-Wan Kenobi.")
end
fav_farewell = gets().chomp()
puts("#{fav_farewell} to you too.")
puts("Well R2, I suppose we'll just have to keep looking.")
puts("R2-D2: (Agreeable droid noises)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment