INTRODUCTION TO PYTHON – CHAPTER NOTES
1. Algorithm
An algorithm is a step-by-step procedure used to solve a problem. Characteristics: Clear, finite,
ordered, and easy to understand.
Advantages:
• Easy to understand
• Helps in problem solving
• Independent of programming language
• Easy to detect errors
2. Flowchart
A flowchart is a graphical representation of an algorithm using symbols.
Important Symbols:
• Oval – Start/Stop
• Parallelogram – Input/Output
• Rectangle – Processing
• Diamond – Decision Making
• Arrow – Flow Direction
3. Control Structures
Control structures determine the order of execution of statements in a program. Types: Sequential
Flow, Selection Flow, Repetition Flow.
Sequential Flow
Statements execute one after another from top to bottom. Example: 1. Start 2. Input marks 3.
Calculate total 4. Calculate percentage 5. Display percentage 6. Stop
Selection Flow (Branching)
Execution depends on a condition (True/False). Uses if-else statements. Example: If percentage >
90, display 'Award Given', otherwise display 'No Award'.
Repetition Flow (Looping)
A set of instructions is repeated multiple times based on a condition. Used when the same task
must be performed repeatedly.
Important Exam Definitions
Algorithm: Step-by-step procedure to solve a problem.
Flowchart: Graphical representation of an algorithm.
Sequential Flow: Execution of statements one after another.
Selection Flow: Execution based on a condition.
Repetition Flow: Repeated execution of instructions.