Python Principles

While loops

Slide solved ✓

While loops

A while loop is a type of loop that repeats some lines of code while some condition holds.

In other words, a while loop is a way to execute code repeatedly for as long as something is true.

Lesson completed

Congratulations! You have finished the lesson "While loops".

Rate the lesson

Leave feedback



Next lesson Browse lessons
Sorry, that's not right.

explanation