Recent-Post

Python While loop :-


Python While loop :-

The while loop is also known as a pre-tested loop in general, a while loop allows a part of code to be executed as long as the given condition is true.

It can be viewed as a repeating if statement. The while loop is mostly used in the case where the number of iterations is not known in advance.

while expression:

 statements

Here, the statement can be a single statement or the group of statements. the expression should be any valid python expression resulting true or false. The true is any non-zero value. 

                                 PERFORM LIKE THIS:-

                         { PERFORM THE PYTHON LOOP}

EXAMPLE:-

                        EXAMPLE LINK:-


Post a Comment

0 Comments