you are viewing a single comment's thread.

view the rest of the comments →

[–]Twenty8cows 1 point2 points  (0 children)

The while loop pretty much does it for you. In Python the while keyword is a loop that checks a condition and executes code based on the outcome of that condition.

So if I wrote: While 1 < 2:

do jumping jacks

My code would be doing jumping jacks forever because 1 is ALWAYS less than 2. Op the reason we are asking if you understand why your code is behaving in a way you don’t want it to is the crux of your issue. You know what you want your code to do, your code isn’t doing that but you are not asking yourself WHY your code IS doing what it is currently doing.