[Edu-sig] understanding recursion

kirby urner kirby.urner at gmail.com
Mon Feb 12 19:59:49 CET 2007

> Another problem (both with Kirby's implementation and mine) is that you
> "get
> lucky": if the user specifies the smaller number and the larger number in
> the "wrong" order, the algorithm magically swaps them for the next
> recursion. When tackling other recursion problems, students probably won't
> be able to count on such luck.
> -John

Yes I agree that that's fun, about the automatic swapping.

Also, it shouldn't escape note that *all* of these recursive
solutions, from elegant to more transparent, seem harder
to grok than the non-recursive version first given, which I
credit to Guido.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/edu-sig/attachments/20070212/65cc7b6f/attachment.html 

More information about the Edu-sig mailing list