Re: [Edu-sig] do as a keyword

2007-12-12 Thread Brian Blais
On Dec 11, 2007, at Dec 11:11:11 PM, Terry Reedy wrote: Steven D'Aprano [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] || | But loops that run at least once is a basic element of algorithms. | Perhaps not as common as the zero or more times of the while loop, but | still

Re: [Edu-sig] do as a keyword

2007-12-12 Thread kirby urner
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

Re: [Edu-sig] do as a keyword

2007-12-12 Thread Vern Ceder
Brian Blais wrote: I find that when teaching beginning programmers, they usually think in until terms, and not while terms. I haven't noticed that so much myself, actually... My students (grades 8-10) tend to think in fixed numbers of repetitions and the whole idea of a flexible loop is a

Re: [Edu-sig] do as a keyword

2007-12-12 Thread michel paul
they find the while logic to be unintuitive I've found that a good way to explain 'while' is to consider it as an 'if' statement that repeats. Kids grasp simple conditionals fairly easily. I would sometimes hear them talk about 'if loops' when they were actually trying to discuss conditional

Re: [Edu-sig] do as a keyword

2007-12-12 Thread kirby urner
Also people have different styles, like you don't need to use a bare True, but might go like: untouched = True while untouched: keepmoving() or something similar. Kirby ___ Edu-sig mailing list Edu-sig@python.org

Re: [Edu-sig] Wrapping functions in a Function class

2007-12-12 Thread Andrew Harrington
Nice wrapper class Kirby! One thought: multiplying functions is another operation. I would tend to reserve '*' for that, or you will be confusing of limited. Since the raised circle is not a python operator, it appears you need to use a different, nonstandard composition symbol. Perhaps '%' (it

Re: [Edu-sig] Wrapping functions in a Function class

2007-12-12 Thread kirby urner
On Dec 12, 2007 8:35 AM, Andrew Harrington [EMAIL PROTECTED] wrote: Nice wrapper class Kirby! One thought: multiplying functions is another operation. I would tend to reserve '*' for that, or you will be confusing of limited. We say another operation but then we deliberately re-confuse them

[Edu-sig] [Fwd: Re: do as a keyword]

2007-12-12 Thread Christian Mascher
---BeginMessage--- Hi, Brian Blais wrote: I find that when teaching beginning programmers, they usually think in until terms, and not while terms. do: Forward() until Touched() and I have to explain to them that Python doesn't have until, and that the logic for while is exactly the

Re: [Edu-sig] [Fwd: Re: do as a keyword]

2007-12-12 Thread kirby urner
On Dec 12, 2007 8:54 AM, Christian Mascher [EMAIL PROTECTED] wrote: SNIP If Python's main goal was to be the most beginner friendly programming language for the first x hours, then it should probably provide many more such constructs; PASCAL FOR-loop is also easier to teach to novices than

Re: [Edu-sig] do as a keyword

2007-12-12 Thread Brian Blais
On Dec 12, 2007, at Dec 12:11:26 AM, kirby urner wrote: Also people have different styles, like you don't need to use a bare True, but might go like: untouched = True while untouched: keepmoving() or something similar. True, and this is what I do, but I find myself more often than