I need help with this one. I don't know how to add capitalize to the first name, last, city and upcase for state . Plz give me a hand
Hi remove the dot before
state = .upcase!
Let's rethink this a little bit.
You are writing a program here, and the first thing you want to do is get the user's first_name. You should ask them that instead of "This is my question?".
Once you get their response, store it in a place like
Do you see how that will be more useful?
I give up man, i really don't know what to write
I can see that you already know how to display some text on the screen.
My first question for you is, why would you display "This is my question?", why not display "What's your first name?"?
Just tell me what you are thinking about that one line.
Yes! line 1 is perfect now.
Next, instead of storing the response in
answer, like you have done on line 2, why not store it in something more recognizable to you, like
You aren't quite getting my point.
Originally, you stored the user's response in
answer = gets.chomp
I'm asking you, why not store their response in
first_name = gets.chomp
Maybe you are not understanding what gets.chomp is doing for you?
can you explain it to me please? i didn't understand it very well.
ok, i did that but now when they ask me what's my first name what the ■■■■ i must write.
When you ask the user a question, you need a way to get their response. That is what
get.chomp does for you.
- You print a question for the user,
- They type an answer
get.chompit and save it for later.
You can answer with anything really, but your first name would be the normal response.
Doesn't work man. I wrote my first name and it doesn't work
Well, we've only done the trouble shooting on lines 1 and 2. If you have those right, we can move on to line 3.
Ok, can we move on to line 3?
The next thing the exercise wants you to do with the new
first_name variable is make sure that the first letter is uppercase. You can do that like this:
You are getting closer! Are you planning on using that answer2 variable for anything ? I would suggest deleting line 3.
And really, everything else too, except for the three lines that we have been working on so far.