On 12/07/06, Christopher Spears <[EMAIL PROTECTED]> wrote:
> Now the exercise is:
> As an exercise, rewrite this function so that it
> doesn't contain any loops.
>
> I have been staring at this function and drawing a
> blank.  Something tells me that I need to use
> iteration, but I am not sure how I could implement it.

Hi Chris,

You are using iteration.  That's what loops are :-)

Perhaps you meant to say "recursion", which is where a function calls
itself.  You could solve this recursively, but I think Gregor's
comment is closer to what they want you to do.

-- 
John.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to