While loops in Python3

While Loop statement in Python programming language repeatedly executes a statement as long as a given condition is true.

In this blog post I will show you again a Flow Chart which visualizes While Loops and makes them easier to understand:

A While Loop statement looks like this:

Let’s show you an example of a program that counts up to a certain figure and stops afterwards. In this example we want to count up to 9.

The Output looks like this:

Hinterlasse einen Kommentar

Erstelle eine Website wie diese mit WordPress.com
Jetzt starten