Not understanding instructions very well


#1



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
    else:
        return False


#2

Unreachable after return.

result is undefined. Try,

return cube(number)

#3

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


#4

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