Unit-3 Iterative Statements in Python.ppt
Unit-3 Iterative Statements in Python.ppt
Unit-3
Class-VIII
Index
• Learning Objective • Examples of
• Introduction to iterat While loop using else
ive statements in Pyt statement in Python
hon • Infinite loop in Pytho
• For statement n
• Example of for loop • Examples of Infinite
• in operator in Python lbreak statement in
python
• Example of “in” Oper • jump statement in py
ator thon
• range() function in • break statement in p
Python ython
• Examples of range() f • Examples break state
unction in Python ment in python
• While statement in P • continue statement i
ython n python
ASSISI CONVENT SCHOOL, NOIDA
ASSISI CONVENT SCHOOL
Index
Learning Objectives
• Understanding for statement.
• Understanding While statement.
• Explaining While using else
statement.
• Using Python infinite loop.
• Understanding the jump statement.
For statement
The For Loops in
Python are a special
type of loop statement
that is used for
sequential traversal.
Python For loop is used
for iterating over an
iterable like a String,
Tuple, List, Set, or
Dictionary.
ASSISI CONVENT SCHOOL, NOIDA
ASSISI CONVENT SCHOOL
Index
Example of for loop
in operator in Python
The 'in' operator in Python is
straightforward to use. It
checks whether a value
exists in a sequence (such as
a list, tuple, or string) and
returns a Boolean value:
True if the value is in the
sequence, and False if it's
not.
Syntax
range(start, stop, step)
while expression:
statement(s)