Is it wrong? Really?


#1



I am stuck on this lesson: Setting Up the 'If' Branch, Part 2


I Get this error everytime, but when I run it in the console everything works correctly...

"Oops, try again. Make sure you're using .gsub! to replace every 's' with 'th'."

Please help! :frowning:
I really don't know what I am doing wrong... Thank you in advance!

print "What is one of your hobbies. What do you like about it?"
hobby = gets.chomp
hobby.downcase!

if hobby.include? "s"
    hobby.gsub!(/s/, "th")
else
    puts "That's a good hobby!"
end


#2

The problem is not in your code but it will not pass the SCT because you are supposed to be checking for user_input not hobby :slight_smile:


#3

You are awesome! Thank you!!!


#4

You're welcome :grin: Feel free to click the solution button below my reply if that was the answer you were looking for. :slight_smile:


#5

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