Stuck on: Repeat for More Input


#1

Having trouble with this code...

print "What's your first name?"
first_name = gets.chomp
print "What's your last name?"
last_name = gets.chomp
print "What's your city?"
city_name = gets.chomp
print "What's your state?"
state_name = gets.chomp

I enter in all prompts, but once I run the code I get a message asking if I declared a variable named city? Which it looks like I did...what am I doing wrong?


#2

Hi try to change city_name to just city The same for state_name to just state


#3

Thanks. I appreciate it.