Lesson 2 where is the error

Here is my code
var= user_ input
user_input = gets.chomp

no need to use the keyword end here

You should use print on line one to tell the user you want user input:

var="give me a string"

No need for the “var = user_input”
and end keyword

user_input = gets.chomp
print user_input

@sophiayingsy if you havent figured it out yet put
user_input = gets.chomp
print “user_input”


was looking for help on something else and noticed your answer. The last line should be ‘print user_input’ without the apostraphes. There shouldn’t be quotation marks around user_input or it will just print a string that says user_input.

1 Like