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 - ([EMAIL PROTECTED]) 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 
<[EMAIL PROTECTED]>
<www.campbell-lange.net>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to