#sample solution
print "Type in a string:"
user_input = gets.chomp.downcase
if user_input.include? "s"
user_input.gsub!(/s/, "th")
else
puts "Your input does not contain any letter 's'."
end
puts "You entered: #{user_input}"
print "Type in a string:"
user_input = gets.chomp.downcase
if user_input.include? "s"
user_input.gsub!(/s/, "th")
else
puts "Your input does not contain any letter 's'."
end
puts "You entered: #{user_input}"
No comments:
Post a Comment