Won't recognize code


#1

I have copy and pasted the line of code from the opening example of what it should look like but i keep getting the "Oops, try again. It looks like your 'if' statement syntax isn't quite right. Don't forget to end it with an 'end'!"


#2

The code from the opening example is:

print "Thtring, pleathe!: "
user_input = gets.chomp
user_input.downcase!

if user_input.include? "s"
  user_input.gsub!(/s/, "th")
else
  puts "Nothing to do here!"
end
  
puts "Your string is: #{user_input}"

This code works perfectly, is it the exact same code as yours?


#3

I'm having a very similar problem, I typed up
print "Thtring, pleathe!: "
user_input = gets.chomp
but when i click Save and Submit, the loading wheel thing just keeps rotating and won't let me
continue to the next exercise....I need help...I think there's a glitch though


#4

Hi, i just wrote Hi and it worked for me. Try it by yourself and then tell me if that worked for you :wink: