[Edu-sig] "do" as a keyword

kirby urner kirby.urner at gmail.com
Wed Dec 12 15:32:02 CET 2007


> I find that when teaching beginning programmers, they usually think in
> "until" terms, and not "while" terms.
>

If really beginning, an overview of this whole idea of control structures
makes sense, such as this wikipedia article:
http://en.wikipedia.org/wiki/Control_flow

Then explain how Python is very minimalist in its approach, unlike
some languages, which try to provide all kinds of control structure
semantics, including multiple case loops (do... case... case...)
which Python famously does not natively have either.

> they find the "while" logic to be unintuitive, and I often find myself
> feeling the same way: crafting it with the until logic, and then reversing
> it.

I wouldn't make "intuitive" the guiding light in all cases, as it's
often just code for "conditioned reflex" or "what we're used to."
Usually beginners outgrow their initial discomfort, like when
learning to drive stick instead of automatic or whatever.

Kirby


More information about the Edu-sig mailing list