
report at bugs
Nov 20, 2009, 5:50 AM
Post #1 of 8
(473 views)
Permalink
|
|
[issue7369] Fibonacci example does not include 0; section 4.6
|
|
New submission from prm225 <prm225 [at] gmail>: The example starts off with 1 being printed, while the series is expected to begin with 0 and 1. The example in 4.6 (defining functions) should have been: def fib(n): a, b = 0, 1 while a < n: print a, a, b = b, a+b fib(2000) 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 ---------- assignee: georg.brandl components: Documentation messages: 95542 nosy: georg.brandl, prm225 severity: normal status: open title: Fibonacci example does not include 0; section 4.6 versions: Python 2.6 _______________________________________ Python tracker <report [at] bugs> <http://bugs.python.org/issue7369> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
|