Q about 'Formatting with String Methods'


#1

It gives this as the example:

print "This is my question?"
answer = gets.chomp
answer2 = answer.capitalize 
answer.capitalize!

However, I used:

print "What is your name? "
first_name = gets.chomp.capitalize

print "What is your last name? "
last_name = gets.chomp.capitalize

print "What City are you from? "
city_name = gets.chomp.capitalize

print "What State are you from? "
state_name = gets.chomp.upcase

But that seems to not pass through as correct in the exercise, even though the output is as desired. Am I wrong?


#2

Without a link to the exercise we are left guessing what the instructions ask for. Please post a link when asking for help on a lesson. Thanks.


#3

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