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 everything (ni ni ni ni ni) <br>
<br>So here is the code the book give me.. <br><br>while True:<br> reply = raw_input('Enter text:')<br> if reply == 'stop':<br> break<br> elif not reply.isdigit( ):<br> print 'Bad!' * 8<br>
else:<br> print int(reply) ** 2<br>print 'Bye'<br><br><br>Idle gives me this error SyntaxError: invalid syntax (it highlights the word print in the print 'bye' line.. <br><br>This bugs me! I don't know why it's not working.. However, I know it is in the print line... because When I get rid of print it does everything it is supposed to do..it collects my input and provides feedback.. <br>
<br>The print line is supposed to print 'Bye' when you type stop... The book uses 2.5 I'm using 2.6, but I have no idea what is not working..Any hints? <br><br>All help is much appreciated! <br><br>Brian D<br>