String methods


#1


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

Oops, try again. Make sure to call capitalize! on first_name, last_name, and city.


print "Whats your first name?"
first_name = gets.capitalize
print "What is your last name"
last_name = gets.capitalize
print "Enter your city"
city = gets.capitalize
print "Enter State or province (use abbrevations if possible)"
state = gets.upcase
puts "#{first_name} + #{last_name} + #{city} +#{state}"


#2

Hi, @datablaster34231 ,

The instructions state ...

... add the .capitalize! method ...

... but you have ...

first_name = gets.capitalize

... etc.

.capitalize! and .capitalize are different methods, as are upcase! and upcase.


#3

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