There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
Agree with a comment or answer? Like () to up-vote the contribution!
This module wasn’t straight forward. It never showed an example of how to do what the exercise wanted you do. The exercise asks you to create a variable named eric:
issue # 1:
how do you create variable for someone who has never programmed or used Ruby before?
EX. name = “your name”
name is the variable and your name is the value that the variable will be set to store, so that when “name” is called, it will return the value “your name”
EX. puts name
will print “your name”
the exercise appears to go further than the explanation, by asking you to not only create the name variable “eric”, but it also asks that you set it to equal your name in upcase or uppercase. When I look at the solution, the answer doesn’t complete the scenario. it only creates a variable but not assign my name or change the case of the string.
what’s the correct syntax?
name = “eric”
puts name.upcase = “my name” ?
I’m not sure of how to proceed, because I don’t know enough about Ruby to perform this task.
The exercise just wants you to create a variable and assign some string value to it.
The variable is to be called name. If you do something like NAME, Name, nAme or some other variant, then you will actually end up creating a completely different variable which is not what we want. Hence, the instructions to make sure that the variable is called exactly name.
You are supposed to assign a string value to this variable. The string should be your name. “Eric” is just an example. You don’t have to use “Eric”. Suppose your name is Frodo. Then all you need to do is: name = "Frodo"
or if you prefer name = "frodo"
or if you prefer name = "FRODO"
You have leeway in how you write the string representing your name, but the variable must be called name. There is no leeway there. Name, NAME etc. won’t be graded correct.