Infinite Loops



count = 0

while count < -1: # Add a colon
count += 1
print count
# Increment count

What is wrong with this code? Any help would be appreciated. Thank you.


The end point is negative one, but your count starts at zero, so count will never be less than negative one. You have two options, you can replace -1 with anything above zero, or you can replace

the += with -=


Thanks For The Help - It Worked


Awesome, no problem. :slight_smile:


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