Finding average of n numbers in a list
<p>Everything is working except when the user types N to end the while loop, it doesn't go to the For Statement (this happens when you run the program, works fine in the shell and in the py).</p>

<pre><code>potato = []
count = 0
avg = 0

question = input('Finding averages, continue? Y or N: ')
while question == 'Y' and count &lt;= 12:
    num = int(input('Enter a number: '))
    potato.append(num)
    count += 1
    question = input('Continue? Y or N: ')

for fries in potato:
    avg = sum(potato)/count
    print(fries,fries-avg)

print('average is: ' + str(avg))
</code></pre>

<p>It was breaking for me until I changed the input to raw_input. Now it exits the while loop when input is not Y:</p>

<pre><code>question = raw_input('Finding averages, continue? Y or N: ')
</code></pre>

python python-3.x input