Nearby lessons

38 of 159

Python - Looping Statements

📌 What You Will Learn
  • Define iteration and looping statements in Python
  • Identify the three types of flow control statements
  • Distinguish the while loop from the for loop
  • Understand the role of break, continue and pass transfer statements

Introduction

Flow Control decides the order in which Python statements are executed.

It helps the program make decisions, repeat tasks, and control the execution of statements.

Types of Flow Control Statements

Python provides three types of flow control statements.

Category Statements
Conditional Statements if, if-elif, if-elif-else
Iterative Statements while, for
Transfer Statements break, continue, pass

Iterative Statements

Sometimes we need to execute a group of statements multiple times.

This repeated execution is called Iteration.

Python provides two iterative statements:

  1. while Loop
  2. for Loop
📝 Key Takeaways
  • Looping statements execute a group of statements multiple times through iteration
  • Python provides two iterative statements: while and for
  • Flow control has conditional, iterative and transfer statement categories
  • break, continue and pass are the three transfer statements
  • The repeated execution of a group of statements is called iteration

🧠 Test Your Knowledge

40 Questions
Progress: 0 / 40