(not in python thread because you've probably been bored of me posting non-working code 20 times over the past day)
import os
def printnumber(number):
print int(number)
x=1
while x<20:
printnumber(5)
printnumber(6)
x=x+1
while x<10:
printnumber(7)
printnumber(8)
os.system('pause')
expected output:
5
6
7
8
5
6
7
8
5
6
7
8
5
6
7
8
.....
and then eventually only
5
6
5
6
5
6
...
and the eventually it stops.
but it just prints 7 and 8 forever. what's wrong?