9. by_three?


#1

I don't get it, seems no matter what I do I get back either "It looks like your by_three? method doesn't return true for all numbers evenly divisible by three." or vice versa :frowning:

def greeter(name)
return "Hello #{name}"
end

def by_three?(number)
if number & 3 == 0
return true
else
return false
end
end


#2

Just return name which is the parameter to be passed.

Also,

you should be dividing by 3 I believe. The right symbol is %.

if number % 3 == 0

Hope this helps! :slight_smile:


#3

OMG I'm an idiot and didn't notice I put & instead of % :tired_face:

Thank you.


#4

it's fine.

Have fun coding! :slight_smile:


#5

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