Help with string interpolation


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-ruby/lessons/putting-the-form-in-formatter/exercises/printing-the-output?action=lesson_resume&link_content_target=interstitial_lesson

<In what way does your code behave incorrectly? Include ALL error messages.>
I keep getting an error in the console with the following code it says my syntax is incorrect, but I don’t see anywhere where it is incorrect for string interpolation.

```

print "What’s your first name?"
first_name = gets.chomp

print "What’s your last name?"
last_name = gets.chomp

print "What city are you in?"
city = gets.chomp

print "What state are you in?"
state = gets.chomp

puts “Your name is #{first_name} #{last_name}, and you live in #{city}, #{state}!”

<do not remove the three backticks above>

#2

It seems you’re using the wrong quotes on the puts. Try copy pasting the quotes from a print and see if it works.


#3

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