What-is-loop-in-Python .

In this session i have discussed loop in python .


A loop is very importan aspect of every programming language . In loop a set of statements are executing again and again until the specified condition become false . We can divide the loop in two parts
a) control statement
b) loop body .

Types of Loop :

There are two types of loop as follows

1-Entry-Control-Loop

2-Exit-Control-Loop

1-Entry-Control-Loop:

CSharp entry control image

In entry control loop control first check the condition if condition is true then control come inside the loop body other wise control go out side of loop (next statement) .

There are following types of entry control loop .

a) for Loop .

b) While Loop .

2-Exit Control-Loop :

CSharp entry control image

In exit control loop control first come inside the loop body and then check the condition if condition is true then control again come inside the loop body other wise go out side of the loop (next statement) .

In exit control loop only one type of loop as follow .

a) do-while Loop .


Welcome to AndroidATPoint.

back image                     next image