python recursive function
Bruno Desthuilliers
bruno.42.desthuilliers at wtf.websiteburo.oops.com
Fri Jan 11 05:49:16 EST 2008
Duncan Booth a écrit :
> Bruno Desthuilliers <bruno.42.desthuilliers at wtf.websiteburo.oops.com>
> wrote:
>
>> You want:
>> return bears(n - 42)
>
> Actually, no he doesn't. He needs to explore all options when the first
> attempt fails.
Possibly - I didn't bother checking the algorithm correctness, just
pointed out an obvious newbie programming error.
> But I'm not going to write his homework for him.
Nor do I.
More information about the Python-list
mailing list