Re: Getting a loop to activate a loop above it

2006-03-23 Thread adam . deprince
This is how python is supposed to work. I'm sure not what languages you have used ... it seems that you are expecting some sort rule based system like make, or prolog. Grab a cup of joe, pull up a chair and let me help you out here. Python is an imperative language, you can envision the presence

Re: Getting a loop to activate a loop above it

2006-03-23 Thread Arne Ludwig
I think the problem is this line: > x == input('What is x now?: ') which should not have a == but a = -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting a loop to activate a loop above it

2006-03-22 Thread Terry Hancock
On 22 Mar 2006 13:07:33 -0800 "Byte" <[EMAIL PROTECTED]> wrote: > The following code will not work for me: > > x = 1 > > while x == 1: > print 'hello' > x = input('What is x now?: ') > > while x == 2: > print 'hello again' > x == input('What is x now?: ') > > The second loop dos

Re: Getting a loop to activate a loop above it

2006-03-22 Thread Jordan Greenberg
x=1 while not x==3: if x==1: print 'hello' x = input('what is x now?: ') if x==2: print 'hello again' x=input('what is x now?: ') any code you want to repeat needs to be in some sort of a loop structure. Program execution doesn't just jump around unless you t

Getting a loop to activate a loop above it

2006-03-22 Thread Byte
The following code will not work for me: x = 1 while x == 1: print 'hello' x = input('What is x now?: ') while x == 2: print 'hello again' x == input('What is x now?: ') The second loop dose not seem to be able to activate the loop above it Proof from my command line: $ pyt