Control Structures of Programming
Control Structures of Programming
Programming
Introduction to Programming Concepts by Amali Gunasinghe MSc,
BSc(Hons) in Information Technology(SLIIT)
by Rutvika Ghadiyali
Learning Objectives
Understand Control Identify Types Implementation
Structures
Differentiate between Learn to implement and use
Grasp the concept and sequential, conditional, control structures in programs.
importance in programming. iterative, and branching
structures.
What are Control Structures?
Control structures are fundamental programming Types of Control Structures:
concepts that control the flow of execution in a
• Sequential Control
program.
They enable programs to make decisions, repeat tasks, • Conditional Control (Selection)
or execute code conditionally.
• Iterative Control (Loops)
• Branching Control
Sequential Control
Brush your teeth
Have breakfast
Go to school
If-Else Statement
2 Provides alternative path if condition is false
Else-If Ladder
3 Checks multiple conditions in sequence
Continue Statement
Skips current iteration and moves to the next one.
Example
for i in range(10):
if i == 5:
break
print(i)
Summary
Sequential Conditional
Linear execution of instructions Decision-making based on conditions
Branching Iterative
Controlling flow within loops Repeating code multiple times
Practice using different control structures in simple programs to understand how they help in problem-solving.
Thank You
Contact Information
Email: [email protected]
Questions?
Feel free to ask about any control structures concepts!
References
Kernighan & Ritchie, Kochan, Sipser, GeeksforGeeks,
TutorialsPoint