ruby duckify code


SUBMITTED BY: Guest

DATE: May 16, 2013, 11:43 p.m.

FORMAT: Text only

SIZE: 258 Bytes

HITS: 16633

  1. print "Input please: "
  2. user_input = gets.chomp
  3. user_input.downcase!
  4. if user_input.include? "s"
  5. user_input.gsub!(/s/, "th")
  6. else print "There is not an s in the string you provided us... please try again"
  7. puts user_input
  8. end

comments powered by Disqus