On Sun, Apr 4, 2010 at 3:15 PM, Brian Drwecki wrote:
>
> As for the exact error codehere it is.
>
> while True:
> reply = raw_input('Enter text:')
> if reply == 'stop':
> break
> elif not reply.isdigit( ):
> print 'Bad!' * 8
> else:
> print int(rep
Python version
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)]
on win32
Type "copyright", "credits" or "license()" for more information
As for the exact error codehere it is.
>>>
while True:
reply = raw_input('Enter text:')
if reply == 'stop':
b
similarly, you get an error if:
"print int(reply) ** 2
print 'Bye'"
... is all a single line and/or if you mixed spaces and TABs.
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
"Python Fundamentals", Prentice Hall,
On Sun, 4 Apr 2010 03:40:57 pm Brian Drwecki wrote:
> Hi all... I am working from the Learning Python 3rd edition published
> by O'Reily... FYI I am trying to learn Python on my own (not for
> course credit or anything).. I am a psychologist with very limited
> programming experience.. I am anal, a
Hi all... I am working from the Learning Python 3rd edition published by
O'Reily... FYI I am trying to learn Python on my own (not for course credit
or anything).. I am a psychologist with very limited programming
experience.. I am anal, and this example code doesn't work.. I am using IDLE
to do ev