Infinite Loop


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!
count = 0

while count < 10:
print count
# Increment count


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


is same as


And i dont see any missing colon.

but dont forget to indent


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