Is it wrong? Really?


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

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


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:


You are awesome! Thank you!!!


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:


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