Fibonacci series recursion error

Jayme Proni Filho listas.programacao at gmail.com
Sat Apr 30 20:10:39 EDT 2011


I tested your function. So You must remeber:

By definition, the first two Fibonacci numbers are 0 and 1, and each
subsequent number is the sum of the previous two. Some sources omit the
initial 0, instead beginning the sequence with two 1s.

In math terms it means: F(n) = F(n - 1) + F(n - 2)

I did a recursive form for you here http://pastebin.com/SN9Qheqn
Try to do a iterative form for improving your skills. and look this docs
here
http://docs.python.org/tutorial/modules.html

Good ideas man. Bye bye.

---------------------------------------------------------------------------------------
Jayme Proni Filho
Skype: jaymeproni
Twitter: @jaymeproni
Phone: +55 - 17 - 3631 - 6576
Mobile: +55 - 17 - 9605 - 3560
e-Mail: jaymeproni at yahoo dot com dot br
Blogs (Em construção)
Programandor: http://jaymeproni.wordpress.com
Sociedade em Ação: http://sociedaemacao.wordpress.com
---------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110430/f3fd17cf/attachment-0001.html>


More information about the Python-list mailing list