You will enjoy WHILE you are here.

--Originally published at Hackerman's house

The while loop is a function that repeats a section of the code. This section will be repeated as long as a condition is repeated.

The syntax used is:

while condition:

Section of the code that will be repeated.

The code I created is used to count from 0 seconds to 15 seconds, I also import a python library in a pretty basic way, but we will see that mastery topic in depth in another blog post. As long as the variable in the program is less than 15, the variable will be printed with a 1 second delay. When the condition no longer is fulfilled you can do that the program does something else with the ELSE function.

While loop

Here is how the actual programm works.

While loop result

And this is the final result.

While loop result

I hope this blog was useful for you.

giphy (4)


The Zen of Python

--Originally published at Hackerman's house

giphy (2)

These are the guiding principles of the Python language. These are useful to understand the pilosophy of the language and to understand easily how Python works.

These can be found in the official python site at the following link: https://www.python.org/dev/peps/pep-0020/ Zen

It is useful to know your priorities when you are programming.