Skip to content

Instantly share code, notes, and snippets.

@britbrith4
Created March 18, 2015 02:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save britbrith4/16e308a222274812caf1 to your computer and use it in GitHub Desktop.
hw 2 day 1
puts "Hi I'm C-3P0, huma-cyborg relations"
puts "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_name= gets.chomp
puts "#{user_name}? 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.downcase
if user_answer == "i do"
print "Oh, marvelous! Simply marvelous! Say hello to R2-D2; he's been looking all over for you. "
else
end
print "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. "
print "Say goodbye, #{name}!"
user_goodbye= gets.chomp
print "#{user_goodbye}, to you too! "
print "Well R2, I suppose we'll just have to keep looking. "
print "R2-D2: (Agreeable droid noises)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment