1.6.2
Iteration
Test your knowledge with free interactive questions on Seneca — used by over 10 million students.
Iteration
Iteration allows a group of statements to be repeated multiple times. Iteration statements are often called loops.

Indefinite iteration
- A block of code will repeat whilst a specified condition is true.
- For example: the while loop will continue to execute an indented code block while a certain condition is true.

Definite iteration
- A block of code will repeat a known number of times.
- For example: a for loop will execute an indented block for each value in a list of values.

Flow diagram
- A flow diagram for iteration uses the diamond shape.
1Introduction to Python
1.1Python
1.2Input & Output
1.3Data Types
1.4Variables & Constants
1.6Program Flow
2Data Structures
2.1Lists & Strings
2.2File Handling
3Modularity
3.1Subroutines
3.2Data Flow
4Good Practice
4.1Naming & Whitespace
4.2Comments
4.3Exceptions
Jump to other topics
1Introduction to Python
1.1Python
1.2Input & Output
1.3Data Types
1.4Variables & Constants
1.6Program Flow
2Data Structures
2.1Lists & Strings
2.2File Handling
3Modularity
3.1Subroutines
3.2Data Flow
4Good Practice
4.1Naming & Whitespace
4.2Comments
4.3Exceptions
Practice questions on Iteration
Can you answer these? Test yourself with free interactive practice on Seneca — used by over 10 million students.
- 1What are the two types of *iteration*?Fill in the list
- 2What is **definite** iteration?Multiple choice
Unlock your full potential with Seneca Premium
Unlimited access to 10,000+ open-ended exam questions
Mini-mock exams based on your study history
Unlock 800+ premium courses & e-books