Andy: But they don't have any clue that there's a call stack involved, or that
someday this could get them in trouble. I shudder to think about the blank looks that I will get if I try to explain why it could be a problem. I'd praise those stumbling on recursion, use the opportunity to talk about it more specifically, and about how some languages are based on it rather intensively (others not so much). Greatest Common Divisor may be written both ways: def gcd(a,b): while b: a, b = b, a % b return a or: def gcd(a,b): if b: return gcd(b, a % b) return a But of course if your 10th graders are pathologically math phobic, like so many of their college peers, you'll want to eschew any such examples and deal purely with strings. Kirby
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig