[Tutor] tutorial

Remco Gerlich scarblac@pino.selwerd.nl
Wed, 23 Jan 2002 15:09:34 +0100


On  0, AMoore4437@aol.com wrote:
> i have tried to do the first few commands but have come unstuck (see below)
> 
> >>> print "hello world"
> hello world
> >>> print "Here are the ten numbers from 0 to 9"
> Here are the ten numbers from 0 to 9
> >>> for 1 in range(10):
>     print 1,
>     
> SyntaxError: can't assign to literal
> >>>
> 
> what am i doing wrong??

Instead of 'for 1 in', it has to be 'for i in'. The character i (or another
letter, but it was probably i in the tutorial), not the number 1.

Similary, the print command should read "print i,"

I don't know that particular tutorial, but I assume that it already explains
what is actually happening here, so I won't.

-- 
Remco Gerlich