What am i doing wrong? I just don't get it


#1


Stuck on Thith Meanth War! lesson 2.
https://www.codecademy.com/en/courses/ruby-beginner-en-JdNDe/0/2?curriculum_id=5059f8619189a5000201fbcb

I've tried adding end, i've tried quotes around the user input (cos i did that in the intro and it worked fine). I've tried single words. I don't understand what i'm doing wrong. And i keep getting the Error msg "Oops, try again. Did you declare a variable called user_input?"

print "Rock me Amadeus"
user_input = "shit stick" gets.chomp

What am i missing. I know i'm not this thick!


#2

I am new but you aren't supposed to put a string after user_input your supposed to put this down user_input=gets.chomp.downcase!


#3

this is what I did print "What is your name"
user_input= gets.chomp.downcase!
if user_input.include? "s"
user_input.gsub!(/s/, "th")
end


#5

You'll first write print since it says to do so in the instructions. Next, since it says to declare a variable called users_input and set it equal (=) to gets.chomp.

You will write:

print user_input =gets.chomp

It should work!


#6

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