Practice Makes Perfect... please help


Oops, try again. cube(1) resulted in an error: global name 'n' is not defined

I dont know what else to do.

Here is my code:

def cube(number):
    return cube(n)

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


Have you read the error message?
Do you agree with it?
Do you see where you are doing what it suggests you're doing?
Would you argue for that you can do what you're doing?
What information are you missing to fix it?


Yes, I've read the message, and yes, I agree with it, but no, I don't see what I'm doing and why it is suggesting it...

Could you help with that part first please???


global name 'n' is not defined

This suggests there was an attempt to read it, but that's not possible if it hasn't been defined


Question 2 asks you to return the cube of of NUMBER


That should fire you up (0v0)/~


Thanks guys!
I've got it now!!!


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