Can someone explain what 'while true' and while false' mean? I mean while what is true?


8/31/2019 6:26:27 PM


4 Answers

New Answer


Błack Jesus😣 If you have that all in a while True loop, considering you used proper syntax (all keywords are lowercase, indentation is correct, print statement was written correctly, etc.), it will run but will create an infinite loop, which wouldn't really be of much use if you're not breaking out of it


while True is a loop that tests the value of the boolean value True, and because it will always satisfy the conditional for the loop, the loop will always run unless it encounters a break statement within it while False will never run as the boolean value False will never satisfy the condition (while loops have to evaluate to True for them to run)


Faisal what if we use while True and the code statement goes like this? A =4 If A >=8 Print=(A) #what will happen will it run?


It will endlessly run in silence giving you the impression that your device hangs and is unresponsive.