Results look good but error still?


My results look good, but I keep getting this error message
"Oops, try again. Make sure to call capitalize! on first_name, last_name, and city."
Help please!

print "What's your first name?"
puts "Her first name is #{first_name1}"

print "What's your last name?"
last_name = gets.chomp
puts "Her last name is #{last_name1}"

print "What city do you live in?"
city = gets.chomp
puts "She lives in #{city1}"

print "What state abbreviation?"
state = gets.chomp
print "#{state1}"


You're missing the exclamation marks on the capitalized methods.


I hope this helps! :slight_smile:


Thanks! Do you mind explaining the reason for using the exclamation marks?


You're welcome.

I'm not going to come in too technical on this.

! - when used on a method, modifies the object on which that method was called on - kinda permanently.

In another case, you might have seen or will see ? on methods.

? - says it's going to return a Boolean.

I hope this helps. :wink:


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