7.Now You Try! HELLLLPPPPP!


#1



https://www.codecademy.com/courses/ruby-beginner-en-1o8Mb/1/2?curriculum_id=5059f8619189a5000201fbcb

this is the error message: uninitialized constant Context::Ruby


This is what i have.. its asking me to "Create a variable, favorite_language, and conditionally set it to your favorite programming language."

so i put 

# Write your code on line 2!
favorite_language = Ruby
puts favorite_language

its telling me "Oops, try again. It looks like you didn't use the conditional assignment operator in your code." 

What do I do to get this right?


#2

How can you represent text as data in ruby? What data type has that purpose? And how would you create one of those?


#3

are you responding to the right thing? i need help with passing this lesson


#4

I am. Yes.

The exercise is to create some data representing the text: Ruby

A code file contains code, if you put text in it, it will be interpreted as code. If your text is not code, but data to be stored and manipulated, you would need to tell ruby that it's data, not code. How does one represent text in ruby?


#5

im sorry im just kinda in a bad mood because i feel like its on the tip of my tongue(brain) but it just wont come


#6

Sure. I'm just not interested in pointing out the mistake. Much more so in leading you there. That starts with identifying the problem.

As you mentioned, the error message is:

uninitialized constant Context::Ruby

See how that relates to what I said about it treating your text as code?

So, now you need a way of doing that, but you don't know how. Search engine. Search for the thing that you need to do, represent text in ruby.


#7

I have to put " "
i put
favorite_language= "Ruby"
puts favorite_language
it says oops, try again. It looks like you didn't use the conditional assignment operator in you code.

what would be the conditional operator ?


#8

I'm guessing that exercise describes what that is!
Oh it doesn't. The previous one does!


#9

Thank you for not giving me the answer. a lot of times ill overlook what i just learned thinking the lesson is calling on something from further back. I got it... thanks again for making me think a bit harder on it


#10

Write your code on line 2!

favorite_language ||= "Ruby"
puts favorite_language


#11

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