[Edu-sig] about iterators, range, and summing consecutive integers

kirby urner kirby.urner at gmail.com
Sat Mar 27 06:57:46 CET 2010

On Fri, Mar 26, 2010 at 10:38 PM, kirby urner <kirby.urner at gmail.com> wrote:

<< snip >>

> How else might we address a Python range object?
> With slicing notation:
>>>> d[1]
> 1
>>>> d[4]
> 4

Erratum:  no, not with slicing notation, with individual indexes only:

>>> d[2:3]
Traceback (most recent call last):
  File "<pyshell#230>", line 1, in <module>
TypeError: sequence index must be integer, not 'slice'


Thanks for the pointer to an overview of turtle graphics responses Daniel.

I always thought Logo was under-appreciated for what it could do
completely independently of having a turtle.  Your libraries prove that
you really appreciate Logo.

Speaking of turtle art, I found this entertaining session with Alex Martelli
helping out:


Note:  The iterator stuff I just posted is to help with a 'Gnomon
Studies' lesson plan...


More information about the Edu-sig mailing list