Lesson Good Coding: Naming Conventions


#1

Instructions are:

Create a variable name in the editor and set
it equal to your name as a string (between
quotes, like this: "Eric"). Your string can be
capitalized, but name should be all lower case!

I wrote:

puts "Albertmark".downcase
some_variable = "Your sting here!"

Anything wrong? It won't let me pass. Thanks!


#2

"Albertmark" is a string primitive. We need to assign it to a variable:

my_name = "Albert Mark"
puts my_name.downcase

#3

Thanks!:grinning::smile:


#4

Never mind:confused:

my_name = "Albert Mark"
puts my_name.downcase
some_variable = "Your string here!"

Computer says:
Oops, try again. Did you declare a variable called name?


#5

Computer says same thing to plain:

my_name = "Albert Mark"
puts my_name.downcase

#6

Use the variable name given in the instructions. Mine is just an example.


#7

:confused::confused::neutral_face:
So what am I supposed to write???????
I used my username for the thing,
even though I know yous is an example.


#8

The error message says name so that is what we should use:

name = "Albert Mark"
puts name.downcase

or

my_name = "Albert Mark"
name = my_name.downcase
puts name

#9

Thanks a lot!!!!!!!!!!!!!!!!!!!!!!!!