Practice makes perfect


Hello everyone,

How can you tell if your code it is really not "off". Mine is letting me move forward, but the request says "by_three should call cube(number) and return its result." Mine doesn't return the result, just says "None" , so I don't really know if I'm correct. Anyone can provide a clue?

Practice makes perfect

can we see your code? The exercise sometimes just want you to built a function, if you really want output, you need to call the function


def cube(number):
"""returns the cube value"""
cube = number**3
return cube
def by_three(number):
if number % 3 == 0:
return cube(number)
print "%s is divisible by 3" % (number)
return False

Hope my code does not look so messy.
Thanks for the help by the way!


like i said, you need to call your function in order to achieve what you want



Thanks @stetim94 . I'll try that and see what happen :slight_smile:


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