[Tutor] If Elif
big steve
bigsteve127 at hotmail.com
Thu Feb 19 17:05:58 EST 2004
I am having a problem getting the IF/ELIF to cooperate with me. I am using a sample from: Learn to program By Alan Gauld. I keep getting this msg:
IndentationError: unindent does not match any outer indentation level (<pyshell#3>, line 3)
But When I don't indent I get:
SyntaxError: invalid syntax
_________________________________________________________________________________
This is the sample I was trying:
value = 100
if value > 10:
print 'This is OK'
elif value > 50: #This is where I get that msg (IndentationError)
print "Whoops, this is never seen'
else
print ' nor is this'
______________________________________________________________________________
I CAN simply us the If format and all works it is just a little confusing!
Could it be that I have mesed with my default sttings on Indentation? Or am I just to thick to see the obvious? any help ? Thanks Steve Hulett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20040219/3be8eca3/attachment.html
More information about the Tutor
mailing list