6. Practice Makes Perfect


I am stuck at 7. Functions, 6. Practice Makes Perfect

I am receiving the message: "Oops, try again. cube(1) resulted in an error: unsupported operand type(s) for ** or pow(): 'function' and 'int'"

It should return 3

def cube(number):
    return cube ** 3
def by_three(number):
    if (number % 3 == 0):
        return cube(number)
        return False


Please, let me know what I am doing wrong :slight_smile:


This should be using the value passed to the parameter, number:

number ** 3


Thank you SO much!

I have been racking my brain for ages on that. Much appreciated :slight_smile:


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