Not understanding instructions very well


Practice Makes perfect

Oops, try again. by_three(3) resulted in an error: global name 'result' is not defined

Honestly not sure where I am going wrong here. Is result = number not defining enough?

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


Unreachable after return.

result is undefined. Try,

return cube(number)


Ahoy! Thank you very much :slight_smile:
The little things always get me


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