Re: Error invalid syntax while statement

2011-01-08 Thread Terry Reedy
15 print("counter: ", counter 16 17 while (end == 0): # <---returns syntax error on this while statement Among other responses, there is no indent after print. should be print() while x: #now i

Re: Error invalid syntax while statement

2011-01-07 Thread Garland Fulton
On Fri, Jan 7, 2011 at 8:55 PM, Chris Rebert wrote: > On Fri, Jan 7, 2011 at 9:46 PM, Garland Fulton > wrote: > > > 1 #!/bin/bash/python > > > What is > > wrong with my shebang line? > > Its path is invalid (unless you're using a *very* weird system). > /bin/bash is the bash shell executable

Re: Error invalid syntax while statement

2011-01-07 Thread Chris Rebert
On Fri, Jan 7, 2011 at 9:46 PM, Garland Fulton wrote: >   1 #!/bin/bash/python > What is > wrong with my shebang line? Its path is invalid (unless you're using a *very* weird system). /bin/bash is the bash shell executable; bash is completely unrelated to Python. Further, /bin/bash is a file, n

Re: Error invalid syntax while statement

2011-01-07 Thread Garland Fulton
On Fri, Jan 7, 2011 at 8:28 PM, Ned Deily wrote: > In article > , > Garland Fulton wrote: > > I don't understand what I'm doing wrong i've tried several different > cases > > for what i am doing here. Will someone please point my error out. > > > 15 print("counter: ", counter > > Missi

Re: Error invalid syntax while statement

2011-01-07 Thread Ned Deily
In article , Garland Fulton wrote: > I don't understand what I'm doing wrong i've tried several different cases > for what i am doing here. Will someone please point my error out. > 15 print("counter: ", counter Missing ")" on line 15. -- Ned Deily, n...@acm.org -- http://mail.p

Re: Error invalid syntax while statement

2011-01-07 Thread Chris Rebert
On Fri, Jan 7, 2011 at 9:18 PM, Garland Fulton wrote: > I don't understand what I'm doing wrong i've tried several different cases > for what i am doing here. Will someone please point my error out. > Thank you. > >   1 #!/bin/bash/python This shebang undoubtedly erroneous. >   5     if( 0 > x |

Error invalid syntax while statement

2011-01-07 Thread Garland Fulton
I don't understand what I'm doing wrong i've tried several different cases for what i am doing here. Will someone please point my error out. Thank you. 1 #!/bin/bash/python 2 import math 3 try: 4 x = int(input("Enter your number: ")) 5 if( 0 > x | x > 2147483647): 6 r