Professional Documents
Culture Documents
Py Week 06
Py Week 06
ෙනාහැක්කක් ෙනාමැත
www.heladevs.org
Where we are ??
What is
Intro Functions
Computing
Programming
Languages
Variables &
Data Types
Flow Control
Flow Control
Continuation
Loops
week-01 week-14
Previous This Week
Week
Python type system
● Statements
● while loop
● Conditions ● for loop
● If statements
● break statement
● Switch statement
● continue statement
● Nested loops
What is a loop
● In computer programming, a loop is a way to execute a block of code repeatedly
until a certain condition is met. Loops are used to automate repetitive tasks or to
● A for loop is used to iterate over a sequence of data, such as a list, tuple,
string, or dictionary. The loop variable takes on each value in the sequence in
turn, and the block of code within the loop is executed for each value.
Loops in real world
● In production chains.
● Traffic lights
● Autopilot system
loop. This means that the inner loop will be executed multiple times for
intensive/expensive
Week 14
Week 07
• Functions
Week 06
• Flow Control
Continuation
• Loops
THANK YOU
ෙනාහැක්කක් ෙනාමැත.