Practice Makes Perfect
I get an error message as soon as I launch it
My Error Message is:
Oops, try again. cube(1) resulted in an error: 'function' object has no attribute 'number'
I want my code to define cube then do a check if it's equal to a number, if it is I want the code to cube my variable cube(number), I did not put a else statement because the instructions didnt say to
I also expect my code to create a new function called by_three which I assigned the argument number and if it's divisible by 3 return cube and otherwise return False (also, can someone explain why it returns False, i don't get that)
def cube(number): if cube == cube.number(): return cube*cube*cube def by_three(number): if by_three / 3: return cube else: return False