Practice Makes Perfect


#1



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

So I am getting the return that I want and as far as I know all my code is correct but I'm getting "Oops, try again. It looks like your by_three? method doesn't return false for all numbers not evenly divisible by three." What am I doing wrong?

Heading


def greeter(name)
    return ("Hello " + name + "!")
end
greeter("Dan")
def by_three(n)
    if n % 3 == 0
        return "true"
    else 
        return "false"
    end
end
by_three()


#2

You're probably not meant to return strings but a different data type.
Also note that your function call at the last line has an incorrect number of arguments.


#3

Thanks! I changed it from a string to a boolean and it worked.