Need help with these two challenges


#1
  1. Add an additional if statement to re-prompt the user for input if they don't enter anything.
  2. Think about how you might account for words in which the letter "c" sounds like an "s".

I am stuck with these challenges, please help me!

print "what is your name!"
user_input = gets.chomp
user_input.downcase!

if user_input.include? "s"
user_input.gsub!(/s/, "th")

else
puts "there is no s in your input!"
end

puts "your string is, #{user_input}"

`


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.