Printing the output


#1



can someone help i dont know what im doing wrong

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


i keep getting this error message
(ruby):1: syntax error, unexpected tIDENTIFIER, expecting $end
first_name="Joe" gets.chomp


this is my code
 print"what is your first name?"
first_name="Joe" gets.chomp
puts "your name is #{first_name}!"
print"what is your last name?"
last_name="Joe" gets.chomp
puts "your name is #{last_name}!"
print"what is the name of your city?"
city="paris" gets.chomp
puts "you live in #{city}!"
print."what state do you live in?"  
state="AZ"gets.chomp 
puts"you live in #{state}!"


#2

In the following line, you have asked the user of your program a question.

print "what is your first name?"

The next thing you should be doing is using gets.chomp to get and save their response. Instead you have done this:

first_name="Joe"  // I'm ignoring the gets.chomp bit to make a point

so even if Betty or Veronica give you their first name, you use Joe. That is going to be a confusing thing for the users of your program.


#4

The trouble with that as a solution is now you've hard coded your variables. Your program is only good for one user. Imagine a website where the login worked like that.