Infinite loops


#1

count = 0

while count < 10:
    print count += 1

I tried

count = 0

while count < 10:
    print count = count + 1

Oops, try again. Did you remember to add in the colon on line 3?

File "python", line 4
print count += 1
^
SyntaxError: invalid syntax


#2

Hi here

count = 0

while count < 10:
    print count += 1

you shoudl first print count then increase it


#3

tnx, thought I can increment in same line :smiley:

count = 0

while count < 10:
    print count 
    count += 1