On Fri, 25 Jun 2004 19:06:39 -0400, Adrian Albisser <ju*******@123.cl> wrote:
Hey to everybody, im just beginning to program in python. So i was trying
some function but always when i try the range function i get a error
message.
for number in range(1,100):
print number
Error---> There's an error in your program:
expected an indented block
Read what the message tells you. The problem is not with your range
function, it's the rest of the program. In Python, indenting is
important; it tells the interpreter which bits go together.
So your program should be:
for number in range(1,100):
print number
Note the 4 spaces at the start of the second line. It doesn't have to be
4 spaces, but that's convention.
I'd suggest you read a good python tutorial - I like
http://www.freenetpages.co.uk/hp/ala...d/tutintro.htm
And of course there's
http://www.python.org/doc/current/tut/ on the
python site itself.
chris