def cube(number):

return number * number * number

def by_three(number):

if number % 3 == 0:

print "n is divisble by 3"

return by_three

else:

return False

Please help

def cube(number):

return number * number * number

def by_three(number):

if number % 3 == 0:

print "n is divisble by 3"

return by_three

else:

return False

Please help

The problem you are supposed to be returning `the cube of the number`

in the second method but you are instead returning `by_three`

which is a function why it doesn't work you can solve that problem by doing this

`return cube(number)`

Also here is a hint on modifying your code

```
def cube(number):
return number**3
def by_three(number):
return cube(number) if number%3 == 0 else ""
print by_three(6)
```

You can also check out this snippet here*Click here to go to labs*

Hi,

For the same problem, I get an error saying 'cube(1) returned False instead of 1'. Can anyone identify whats wrong and in the code and suggestions on getting it right.

def cube(number):

return cube == number **3

def by_three(number):

if number % 3 == 0:

return cube(number)

else:

return False

Thank you.

the error is in you cube function implementation this line

```
def cube(number):
return cube == number **3
```

should rather be

```
def cube(number):
return number **3
```

Hi,

I also have the problem, couldn't resolve the message error: *Oops, try again.*

*Did you define a function called by_three?*

after writing this code:

def cube(number):

return number **3

def by_tree(number):

if number %3==0:

return cube(number)

else:

return False

can you help?

Thanks

I'm a begginer but here's a better verison of your code.

def cube(number):

x= (number)**3

return ((number)**3)

def by_three(number):

if (number) % 3 == 0:

print("n is divisible by 3")

```
else:
return (number)
```