New submission from Heinrich Schnermann <[email protected]>:
In https://docs.python.org/3/tutorial/controlflow.html#defining-functions both
examples produce fibonacci numbers starting with 0. They should start with 1,
as in the example in
https://docs.python.org/3/tutorial/introduction.html#first-steps-towards-programming
The first example should change the lines
while a < n:
print(a, end=' ')
to
while b < n:
print(b, end=' ')
and the second example should change the lines
while a < n:
result.append(a) # see below
to
while b < n:
result.append(b) # see below
----------
assignee: docs@python
components: Documentation
messages: 304144
nosy: docs@python, skyhein
priority: normal
severity: normal
status: open
title: Tutorial: Fibonacci numbers start with 1, 1
type: behavior
versions: Python 3.6
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue31757>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com