Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
HW 2
puts "Hi, I am C-3PO, human-cyborg realtions"
puts "May I have your name?"
user_name = gets.chomp
puts "it is a pleasure to meet you,#{user_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 Obi-Wan Kenobi, do you ?(Answer \"I do\" or \"I don't\")"
is_obi = gets.chomp
if is_obi == "I do" || is_obi == "i do" || is_obi == "I DO" || is_obi == "i Do"
puts "Oh, mavelous! Simply marvelous! Say hello to R2-D2; he's been looking all over for you."
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 "What is your favorite farewell?"
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
You can’t perform that action at this time.