0

What is a while True loop ?How does it works?

5th Sep 2020, 9:38 AM
Karanam Deepika
Karanam Deepika - avatar
3 Réponses
+ 3
The while loop continue still the execution reach the result as true But in while(true) the condition is always evaluated as infinitely which means it goes on and on For more results look at this https://stackoverflow.com/questions/29180656/why-whiletrue-is-an-infinite-loop
5th Sep 2020, 9:53 AM
Nilesh
Nilesh - avatar
+ 1
i = 0 while i <= 10: print (i) i += 1 The code inside the while loop will continue until the condition becomes TRUE there's one more thing you can use while(TRUE): to run anything inside the loop indefinitely
5th Sep 2020, 9:56 AM
Preyas
Preyas - avatar