2.6/7 Syntax Error?


#1

Hi, I thought I did this quite well. However It's telling me it's not now, though I can move on just fine. It gives me a syntax error on line 8.

print "What's your first name?"
first_name = gets.chomp.capitalize!
print "What's your last name?"
last_name = gets.chomp.capitalize!
print "What city do you reside in?"
city = gets.chomp.capitalize!
print "What State do you live in?"
state = gets.chomp.upcase!
puts "Your name is #{first_name}, #{last_name}. You live in #{city}, #{state}.".

and here's the error it gives. (ruby):8: syntax error, unexpected $end.

Any reason for this? Thanks
Digidude

Also, is there a way for the future to shrink the code I paste here so it doesn't take up so much room? Like a /spoiler sort of format?


#2

Try getting rid of that period at the end of the last line.
It should look like this:

puts "Your name is #{first_name}, #{last_name}. You live in #{city}, #{state}."