If the condition is given in the while loop, it never becomes hostile, or the condition never becomes unsatisfied, then the while loop will never end, and it turns into the infinite while loop.
Remember- When the while loop condition never goes wrong or evaluates to False, then it will have an infinite loop, which is a loop that never ends (in theory) without external arbitration.
The loop won't stop until you touch 'Ctrl+C.'
An infinite while loop might be beneficial in client/server programming where the server necessitates to run constantly so that client programs can interact with it as and when needed.
An infinite while loop leads to a while loop where the while condition never goes wrong or evaluates to false. When a condition never goes false, the program enters the loop and continues repeating that same piece of code repeatedly, and the loop never terminates.
(Infinite) Knowledge2life
|