What's the question ""global name 'XXX' is not defined "" ? please give me some advice


#1

Excuse me, does anyone can give me some advices?
i couldn't know what's wrong with my code.
Thanks!



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


def cube(number):
    number = number ** 3
    return numeber

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


#2

Just a typo error over there.


#3

hi , what's meaning?


#4

The variable name its "number", you just typed "numeber", there it's the error.


#5

ha ha , thanks
i am so stupid...


#6

No problem, feel free to ask in the forums any time you got a doubt, mark the post as solved please.


#7

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