Stuck! need help


#1

i have been stuck on the same window for a while now and have no idea why. is there anything wrong with my code?

Instructions: Add print prompts, variables, and gets.chomps for the user’s last name, city, and state/province. Use last_name as the variable for the user’s last name, city for their city, and state for their state or province. (Hint: prompt the user to provide an abbreviation for their state or province, such as “NY” for New York. This will naturally lead us to use .upcase later!)

My Code:

print "what’s your first name?"
first_name = gets.chomp
print "what’s your last name?"
last_name = gets.chomp
print "what city do you live in?"
city = gets.chomp
print "what state do you live in?"
state = gets.chomp


#2

Please post a link to the exercise you are on so we can be on the same page. Thanks.


#3

#4

That is not the same as a link, which is what we really need. Please post. Thanks.


#5

https://www.codecademy.com/courses/learn-ruby/lessons/putting-the-form-in-formatter/exercises/repeat-for-more-input?action=lesson_resume


#6

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