Variables and Data Types


variable_name = my_name
name = "obi"
age = "12"
hungry = true

What am i doing wrong? i followed everything to the example


Which exercise was that?


Introduction to RUby : Variables and Data Types


I suppose you're talking about the exercise 2/16 Data Types: Numbers, Strings, Booleans?


hello mate!I think he is talking about introduction(number 13) variables and data types.I am stuck there as well.


Well the problem his code has for this exercise is that he used quotes for his age variable and didn't call it my_age.

The exercise also didn't require a boolean.

Also, he's assigning my_name to variable_name even though my_name wasn't declared beforehand, so he will get an error from Ruby.


I know what you have to do:
variable_name = my_name = "Obi"
variable_age = my_age = 12


Here is what you're doing wrong

In ruby you don't put down the word var or variable. Plus you don't need a string for 12 this is the code you would need

my_name = "obi"
my_age = 12
hungry = true

sorry if I didn't explain this very well, I'm new to ruby myself