While-dest dreams

--Originally published at M E R I N O

While loops yay.

This loops are used when you want to repeat a section of your code like printing a message if the input is wrong or if you want to interact with a variable until it’s true. like making a count to 10. You can also use else to do something when the loop ends and make it cooler. Here is an example:

Captura de pantalla 2016-10-10 a la(s) 11.58.21.pngCaptura de pantalla 2016-10-10 a la(s) 11.58.45.png

But be careful, because if you write something weird or the wrong operator you can end with an infinite loop. Whoops. Like this example:

Captura de pantalla 2016-10-10 a la(s) 12.06.08.png

Captura de pantalla 2016-10-10 a la(s) 12.08.08.png

Clic here if you want to know more about While loops and here if you want to know if you’re using the right operator. Thanks for reading. CODE!