Infinite Loop


#1

Problem: do not know how to fix this infinite loop.
question:The loop in the editor has two problems: it's missing a colon (a syntax error) and count is never incremented (logical error). The latter will result in an infinite loop, so be sure to fix both before running!
code:
count = 0

while count < 10:
print count
# Increment count


#2

you have to increase the number of that variable inside while loop. you could do like

count+=1

is same as

count=count+1

And i dont see any missing colon.

but dont forget to indent


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.