9. by_three?


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}"

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


Just return name which is the parameter to be passed.


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

if number % 3 == 0

Hope this helps! :slight_smile:


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

Thank you.


it's fine.

Have fun coding! :slight_smile:


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