0
What is while true .I know that while 1==1: writes code infinity but I don't know the use of while true why is it use what is it
7 odpowiedzi
0
Well, 1 use I use an infinite loop for is when I make trainers for games.
The program would enter an infinite loop to check if a certain process is open and keep checking until it is open and automatically hook into it.
Another use would probably be a program that continuously monitors a server or something or a program that takes in user input until the user enters Quit.
+ 2
While it's true, do this. When it's no longer true, stop doing that.
+ 2
Think about it, every condition of the while loop is a boolean..
What really is 1 == 1?
Well 1 == 1 is true.
That's the same as while true, only while true doesn't need to evaluate anything. So it's an infinite loop.
Look what Netkos said.
"While it's true, do this".
Is the while true loop true?
Well... Yeah.
0
plz give an example
0
I can't get while true plz give an explained example of while true with what is it and use
0
1==1 ia true, because 1 is equal to 1, but you can use the keyword true (or false). Also you can write 'while 1', 1 means true and 0 means false