While Loop

Let's get acquainted with the while loop and its basic syntax in this lesson.

We'll cover the following

What is a while loop?

The while loop consists of a condition. If the condition is true, then the body of the loop is executed and the condition is checked again. This process is repeated until the condition becomes false. The syntax is as follows:

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy