What is iteration and looping statement in pyhton
Answers
Answer:
Python 3 Iteration Statements. Iteration statements or loop statements allow us to execute a block of statements as long as the condition is true. Loops statements are used when we need to run same code again and again, each time with a different value.
The Iteration statements or repetition statements allow a set of instruction to be performed repeatedly until a certain condition is fulfilled.
The Iteration statement are also called loops All Looping Statement.
Python provides two kinds of loop : For Loop and While Loop to represent to category of loops :-
Counting Loops → the loop that repeat a certain number of times. Python's for loop is a counting loop.
Conditional Loop → the loop that repeat until a certain thing happens i.e. they keep repeating as long as some condition is true. Python's while loop is conditional loop.