Python: invalid syntax for a while loop
<p>I am a beginner python user working on python 2.5.4 on a mac.
I have been trying to create the game stock ticker (text only) in python for the last few days and I am almost finished, but I am getting "Syntax error: invalid syntax" on a while loop. Here is   the part of the code thats giving me problems the error occurs at line 5 and I get a ^ pointed at the e of while.  (I would post the whole thing but its over 300 lines)</p>

<pre><code>while (keep_going ==0):
            sell_var = int(raw_input('Please choose what you would like to sell, for grain enter 1, for technology enter 2, for ore enter 3, for construction enter 4, for bonds enter 5, and for trade enter 6, to skip enter any other key'))
            if sell_var == 1:
                temp_sell = int(raw_input('How many grain stock would you like to sell?')
                while (temp_sell &gt; playgrain[x]):
                    temp_sell = int(raw_input('Please choose a different amount to sell, you do not have that many stock')
                playgrain[x] = playgrain[x]-temp_sell
                playmoney[x] = playmoney[x] + stock[1] * temp_sell
            if sell_var == 1:
                temp_sell = int(raw_input('How many technology stock would you like to sell?')
                while (temp_sell &gt; playertech[x]):
                    temp_sell = int(raw_input('Please choose a different amount to sell, you do not have that many stock')
                playtech[x] = playtech[x]-temp_sell
                playmoney[x] = playmoney[x] + stock[2] * temp_sell
            if sell_var == 1:
                temp_sell = int(raw_input('How many ore stock would you like to sell?)
                while (temp_sell &gt; playore[x]):
                    temp_sell = int(raw_input('Please choose a different amount to sell, you do not have that many stock')
                playore[x] = playore[x]-temp_sell
                playmoney[x] = playmoney[x] + stock[3] * temp_sell
            if sell_var == 1:
                temp_sell = int(raw_input('How many construction would you like to sell?)
                while (temp_sell &gt; playconst[x]):
                    temp_sell = int(raw_input('Please choose a different amount to sell, you do not have that many stock')
                playconst[x] = playconst[x]-temp_sell
                playmoney[x] = playmoney[x] + stock[4] * temp_sell
            if sell_var == 1:
                temp_sell = int(raw_input('How many bonds stocks would you like to sell?)
                while (temp_sell &gt; playbonds[x]):
                    temp_sell = int(raw_input('Please choose a different amount to sell, you do not have that many stock')
                playbonds[x] = playbonds[x]-temp_sell
                playmoney[x] = playmoney[x] + stock[5] * temp_sell
            if sell_var == 1:
                temp_sell = int(raw_input('How many trade stock would you like to sell?)
                while (temp_sell &gt; playtrade[x]):
                    temp_sell = int(raw_input('Please choose a different amount to sell, you do not have that many stock')
                playtrade[x] = playtrade[x]-temp_sell
                playmoney[x] = playmoney[x] + stock[6] * temp_sell
</code></pre>
