Igual que while, pero la comprobación se realiza siempre al final del bucle, por lo que el bloque se ejecuta al menos una vez.
Same as a while but the test is at the end so the loop always executes at least once.
Lo que esto significa es que while siempre se evalúa por sus efectos secundarios, es decir, las consecuencias de evaluar las expresiones dentro del cuerpo del bucle.
What this means is that while is always evaluated for its side effects, which is to say, the consequences of evaluating the expressions within the body of the while loop.
Inicializar el valor significa definirlo para algo apropiado, generalmente para que la expresión booleana sea verdadera y que While... End while ejecute el bucle.
Initializing the value means setting it to something appropriate, usually so that the Boolean expression will be TRUE and While... End while executes the loop.
Queda mejor escribir (una cuestión de estilo) while not hecho: que while hecho == False
It is considered better style to use while not done: instead of while done == False
Alte rezultate
Algunas veces estos son mas rápidos de escribir que el bucle while equivalente.
Sometimes these are quicker to write than the equivalent while loop.
Nuestra estructura general While es que tenemos un bloque aquí.
Our general "while" structure is we had a block here.
Entender que 'while' es una palabra reservada ayudará en las estructuras de control.
Understanding that 'while' is a reserved word will help in control structures.
Esto suena como algo que necesitará un ciclo while.
This sounds like something that is going to need a while loop.
Así que este bucle "while" hace lo mismo
So this "while" loop is doing the exact same thing.
Es un bucle while que se repite mientras el valor de arg sea mayor a cero.
It is a while loop that repeats itself so long as the value of arg is greater than zero.
Finalmente, sabemos que el bucle while debería detenerse cuando no halla guijarros en una fila.
Finally, we know that the while loop should stop making repeated additions when there are no pebbles in a row.
Los perros comienzan a ladrar cada vez que paso. WHILE
La versión que utiliza un bucle while es fácil de comprender, así que voy a adaptarla.
The version that uses a while loop is easy to understand, so I am going to adapt that.
Conținut posibil inadecvat
Exemplele au rolul de a te ajuta să traduci cuvinte sau expresii corect si adaptat la context. Nu sunt selectate sau validate manual, așadar pot conține termeni inadecvați. Te rugăm să raportezi exemplele pe care le consideri inadecvate. Traducerile vulgare sau colocviale sunt în general marcate cu roșu sau cu portocaliu.
Înregistrează-te pentru a accesa mai multe exemple