Re: coding Fibonacci
- From: "black ares" <matematicianu2003@xxxxxxxxxxx>
- To: <programmingblind@xxxxxxxxxxxxx>
- Date: Wed, 4 Nov 2009 19:18:31 +0200
simplex:
$f1=0;
$f2=1;
$fn=$f1+$f2;
write $f1+ " " + $f2 + " " + $fn;
for $i=4; $i=$n; $i++
{
$f1=$f2;
$f2=$fn;
$fn=$f1+$f2;
write $fn;
}
----- Original Message -----
From: "Sina Bahram" <sbahram@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Wednesday, November 04, 2009 7:12 PM
Subject: RE: coding Fibonacci
Can you state your exact problem? Provide the code you've got so far ...
And
so on.
Are you trying to write it recursively or iteratively?
Take care,
Sina
________________________________
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of edward
Sent: Wednesday, November 04, 2009 12:10 PM
To: programmingblind@xxxxxxxxxxxxx
Subject: coding Fibonacci
hello all,
I am having a problem coding this example in python. can anyone help
please.
edward
The Fibonacci series
0, 1, 1, 2, 3, 5, 8, 13, 21, ...
begins with the terms 0 and 1 and has the property that each succeeding
term
is the sum of the two preceding terms. Write a function fibonacci which
accepts a positive number n and returns a list that contains the first n
numbers in the Fibonacci series.
__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind
__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind
Other related posts: