Skip to content

Instantly share code, notes, and snippets.

@misstuggy
Created April 19, 2013 03:17
Show Gist options
  • Save misstuggy/5417877 to your computer and use it in GitHub Desktop.
Save misstuggy/5417877 to your computer and use it in GitHub Desktop.
Challenge problem for Code Academy - my solution.
print "Your phrase here please: "
user_input = gets.strip
while user_input == ""
print "That wasn't a phrase! Try again."
user_input = gets.strip
end
user_input.gsub!(/s/, "th")
user_input.gsub!(/S/, "Th")
print "Daffy says \"#{user_input}\"!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment