<div>Hi All </div> <div> </div> <div>I am getting the result but along with this error, any idea what could be the reason?</div> <div> </div> <div> </div> <div>fibo.fib(1000)<BR> 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987Traceback (most recent call last):<BR> File "<interactive input>", line 1, in ?<BR> File "fibo.py", line 8, in fib<BR> return result<BR>NameError: global name 'result' is not defined</div> <div> </div> <div> </div> <div>Code is given below </div> <div>------------------------------------</div> <div> </div> <div># Fibonacci numbers module<BR>def fib(n): # write Fibonacci series up to n<BR> a, b = 0, 1<BR> while b < n:<BR> print b,<BR> a, b = b, a+b<BR> return result</div> <div> </div> <div> </div><BR><BR>Thanks a lot to all in
advance <br><br>====================<br>Thanks & Regards <br>CSaha<p>
<hr size=1>Yahoo! Mail<br>
Bring photos to life! <a href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=39174/*http://photomail.mail.yahoo.com">New PhotoMail </a> makes sharing a breeze.