Flow Control Structures
•Sequential Execution:
• The default flow of execution where statements are executed one after another in the order they
appear.
• Conditional Statements (Decision Making):
• Used to execute different blocks of code based on conditions.
• Looping Structures (Iteration):
• Used to repeat a block of code multiple times.
• Jump Statements (Control Flow Alteration):
• Used to change the normal sequence of execution.
3.
Conditions and Branching
ifCriteria:
Do
something
if
Criteria:
Do
something
else:
Do
something
if Criteria:
Do
something
elif Criteria:
Do
something
elif Criteria:
Do
something
else:
Do
Python Functions
• Pythonfunctions are repeated blocks which will be used in several places in a program.
• Python functions can be created with arguments or without arguments.
• Python functions can be created with return values or without return values.