[Courses] [python] Lesson 2: Loops, if, and beer

Kathryn Marks kathryn.linux at gmail.com
Sat Jun 25 03:58:24 UTC 2011


On Sat, Jun 25, 2011 at 10:04 AM, Leslie <leslie.brothers at verizon.net>wrote:

> Two questions from this lesson:
> >
> > At the Python >>> prompt, try typing:
> > range(10, 2)
> > [2, 4, 6, 8]
> I didn't get that. I got:
> >>> range(10, 2)
> []
> >>>
>

I got the same.  I tried it on my Mac (2.5) and Windows (2.7) thinking it
something about the version.  But if you want it to count by 2's, then you
need three numbers in the parentheses.

> What gives?? I did not get [2, 4, 6, 8]
>

I didn't get any further because a fuzzy white cat decided to go to sleep on
top of my arms.

-- 
~Kathryn


More information about the Courses mailing list