On Aug 29, 7:18 pm, Alain Ketterlin al...@dpt-info.u-strasbg.fr
wrote:
In general, if you have a program that produces something just to
remove/ignore it five lines later, you have a problem. In your case:
1) are you sure you need to append to list(*) at every iteration? When
do you *really*
level: beginner
i would like to return a selection of the Fibonacci series.
example:
start = 5 ; end = 55
the function should then return [5, 8, 13, 21, 34, 55]
it seems that this is best resolved using an iterative approach to
generate the series. In another post
Baba raoul...@gmail.com writes:
i would like to return a selection of the Fibonacci series.
example:
start = 5 ; end = 55
the function should then return [5, 8, 13, 21, 34, 55]
[...]
my questios:
- would you agree that recursive is not ideal for generating a list?
(in this particular case
On 08/29/2010 07:36 PM, Baba wrote:
level: beginner
i would like to return a selection of the Fibonacci series.
example:
start = 5 ; end = 55
the function should then return [5, 8, 13, 21, 34, 55]
it seems that this is best resolved using an iterative approach to
generate the series.
On Sun, Aug 29, 2010 at 10:36 AM, Baba raoul...@gmail.com wrote:
level: beginner
i would like to return a selection of the Fibonacci series.
example:
start = 5 ; end = 55
the function should then return [5, 8, 13, 21, 34, 55]
it seems that this is best resolved using an iterative approach
Baba raoul...@gmail.com writes:
my questios:
- would you agree that recursive is not ideal for generating a list?
(in this particular case and in general)
In Python that is probably correct in the vast majority of cases for two
reasons:
* lists in Python are implemented as arrays;
* there is
On Sun, 29 Aug 2010 10:36:45 -0700, Baba wrote:
level: beginner
i would like to return a selection of the Fibonacci series. example:
start = 5 ; end = 55
the function should then return [5, 8, 13, 21, 34, 55]
Start with something to lazily generate Fibonacci numbers. It doesn't
matter