What is wrong?


#1



https://www.codecademy.com/en/courses/ruby-beginner-en-MxXx5/0/6?curriculum_id=5059f8619189a5000201fbcb


What's your first name? Ben
undefined method `chomp=' for "Ben\n":String


print "What's your first name?"
first_name = gets.chomp = #{first_name}
first_name.capitalize!
print "What's your last name?"
last_name = gets.chomp = #{last_name}
last_name.capitalize!
print "which city are you_living?"
city = gets.chomp = #{city_name}
city.capitalize!
print "where are you from?"
state = gets.chomp = #{state_name}
state.upcase!


#2

You need to remove all the = #{first_name} for first name, last name, city, and state. It's not necessary and gives an error.


#3

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