Formatting with String Methods


#1

Formatting with String Methods
Great! Now we've got our output, but as you can see, we haven't used string methods to properly capitalize everything yet.

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


#2

when it says "answer" do we put the actual answer i or the word answer


#3

answer is your variable name so you use the word answer.


#4

I am sorry, but I am still so confused about this particular exercise that I don't even know what to ask. I've tried everything and I am told that "answer" is undefined. It says:

undefined local variable or method `answser' for #

I've noticed that this section has let me go forward on incorrect formatting only to have it catch up to me later.

Any help would be appreciated! Thanks! :slightly_smiling:


#5

Did you use "answser" somewhere instead of "answer"?


#6

Why it appears I did use "answser" instead of "answer"! Apparently I needed another pair of eyes to catch the typo. Thank you! :)grin: