[ python-Bugs-1161595 ] Minor error in section 3.2

SourceForge.net noreply at sourceforge.net
Fri Mar 11 20:40:56 CET 2005


Bugs item #1161595, was opened at 2005-03-11 19:29
Message generated for change (Comment added) made by jyby
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1161595&group_id=5470

Category: Documentation
Group: None
Status: Open
>Resolution: Invalid
>Priority: 1
Submitted By: Jeremy Barbay (jyby)
Assigned to: Nobody/Anonymous (nobody)
Summary: Minor error in section 3.2

Initial Comment:
In the section "3.2 First Steps Towards Programming " of 
the Python tutorial (http://docs.python.org/tut/node5.html), 
the output of both implementations of the Fibonacci 
sequence computation is incorrect. 
 
As written, only one 1 should be output.  
You should either remove one 1 from the input,  
or replace the lines "print b" and "print b,"  
by "print a" and "print a,". 
 
This is minor but might confuse unnecessarily  beginners. 

----------------------------------------------------------------------

>Comment By: Jeremy Barbay (jyby)
Date: 2005-03-11 19:40

Message:
Logged In: YES 
user_id=149696

All my apologies: I didn't check my code correctly: 
as the algorithm is initializing a with  0  instead of 1, the output is 
correct. 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1161595&group_id=5470


More information about the Python-bugs-list mailing list