Practice makes Perfect Lesson


#1



https://www.codecademy.com/en/courses/ruby-beginner-en-ET4bU/1/4?curriculum_id=5059f8619189a5000201fbcb#


undefined local variable or method `kevin' for #
I am unsure where the definition issue is here. Any help would be much appreciated.


Replace this line with your code. 
def greeting(name)
   return "Hello there" + name + "." + "It is very nice to meet you."
end


def by_three?(n)
    if n % 3 == 0
        return "true"
    else
        return "false"
    end
end


greeting(kevin)

by_three?(3)


#2

You use kevin without first saying what kevin is


#3

I thought that since I put "kevin" in as the parameter for gretting(name) that it would define kevin as name and then input it for the greeting? how do i define it to do that?


#4

variables refer to values, they are not values
create a value that represents the text you want instead


#5

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