Newbie errors :-( Need help

Rory Campbell-Lange rory at campbell-lange.net
Thu Mar 2 06:12:41 EST 2006


There is no variable called result in your function or, presumably, in
the global scope of the programme.

As you aren't returning anything you may as well omit that line.

On 02/03/06, - C Saha - (p4sync at yahoo.com) wrote:
>   I am getting the result but along with this error, any idea what could be the reason?
>    
>   fibo.fib(1000)
>  1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987Traceback (most recent call last):
>   File "<interactive input>", line 1, in ?
>   File "fibo.py", line 8, in fib
>     return result
> NameError: global name 'result' is not defined
-- 
Rory Campbell-Lange 
<rory at campbell-lange.net>
<www.campbell-lange.net>



More information about the Python-list mailing list