UNIT: II Advance Data Types and Decision Control Lectures:
Statements 04 Hrs
• Advance data types- Tuples, Lists, Sets and Dictionary.
• Decision Control Statements: Decision control statements,
Selection/conditional branching Statements: if, if-else, nested if,
if-elif-else statements (if-else ladder)
• Basic loop Structures/Iterative Statements: while loop, for loop,
selecting appropriate loop. Nested loops,
• The break, continue, pass, else statement used with loops.
Bharati Vidyapeeth's College of Engineering For Women, Pune Savitribai Phule Pune University –
, Control Statements
A control statement is a statement that determines the control flow of a set of
instructions, i.e., it decides the sequence in which the instructions in a program are to
be executed.
Types of Control Statements —
• Sequential Control: A Python program is executed sequentially from the first line
of the program to its last line.
• Selection Control: To execute only a selected set of statements.
• Iterative Control: To execute a set of statements repeatedly.
Bharati Vidyapeeth's College of Engineering For Women, Pune Savitribai Phule Pune University –
, Decision Control Statements
• Decision making statements in programming languages decides the direction of flow
of program execution.
• In our daily life we do many things which depends on some kind of conditions for e.g.
If I study I will pass exams. If he is hungry he will eat etc.
• Sometimes in the program, we need the statement to execute under some condition
like if the value is equal to this, then this will happen and if not equal to this then
this will happen.
• This can be achieved in Python by using the Decision Control statements in python.
Bharati Vidyapeeth's College of Engineering For Women, Savitribai Phule Pune University - 2024-25
, Decision Control Statements
• We have the two types of Control statement in Python:
• Decision Control Statement:
If, If..else, if…elif….else.
• Flow Control Statement:
for, while break, continue
Bharati Vidyapeeth's College of Engineering For Women, Pune Savitribai Phule Pune University - 2024-25
Statements 04 Hrs
• Advance data types- Tuples, Lists, Sets and Dictionary.
• Decision Control Statements: Decision control statements,
Selection/conditional branching Statements: if, if-else, nested if,
if-elif-else statements (if-else ladder)
• Basic loop Structures/Iterative Statements: while loop, for loop,
selecting appropriate loop. Nested loops,
• The break, continue, pass, else statement used with loops.
Bharati Vidyapeeth's College of Engineering For Women, Pune Savitribai Phule Pune University –
, Control Statements
A control statement is a statement that determines the control flow of a set of
instructions, i.e., it decides the sequence in which the instructions in a program are to
be executed.
Types of Control Statements —
• Sequential Control: A Python program is executed sequentially from the first line
of the program to its last line.
• Selection Control: To execute only a selected set of statements.
• Iterative Control: To execute a set of statements repeatedly.
Bharati Vidyapeeth's College of Engineering For Women, Pune Savitribai Phule Pune University –
, Decision Control Statements
• Decision making statements in programming languages decides the direction of flow
of program execution.
• In our daily life we do many things which depends on some kind of conditions for e.g.
If I study I will pass exams. If he is hungry he will eat etc.
• Sometimes in the program, we need the statement to execute under some condition
like if the value is equal to this, then this will happen and if not equal to this then
this will happen.
• This can be achieved in Python by using the Decision Control statements in python.
Bharati Vidyapeeth's College of Engineering For Women, Savitribai Phule Pune University - 2024-25
, Decision Control Statements
• We have the two types of Control statement in Python:
• Decision Control Statement:
If, If..else, if…elif….else.
• Flow Control Statement:
for, while break, continue
Bharati Vidyapeeth's College of Engineering For Women, Pune Savitribai Phule Pune University - 2024-25