Created
April 19, 2013 03:17
-
-
Save misstuggy/5417877 to your computer and use it in GitHub Desktop.
Challenge problem for Code Academy - my solution.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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