IT G12 Chapter 6
IT G12 Chapter 6
INFORMATION
TECHNOLOGY
GRADE 12th
Chapter 6
FUNDAMENTALS OF
PROGRAMMING
Chapter Content
6.1. Program Flow Controls and Syntax in Python
6.2. Comments in Python
6.3. Python Interpreter
6.4. Testing and Debugging Programs
1 Prepared by Sudi.M (Msc) 05/03/2025
Lesson Objective
At the end of this unit, students will be able
to:
Explain program flow controls
Describe conditionals program flow control
Describe iteration program flow control
Construct program statements using
control statements.
Appreciate Python interpreter using
Integrated Development Environment(IDE)
Analyze program statements in debugging
mode
Prepared by Sudi.M(Msc)
Figure 5.8. Disk Defragmenter
13 05/03/2025
Cont…
19
statement_2
Prepared by Sudi.M(Msc) 05/03/2025
for loop with range()
function
The range() function returns a list of
consecutive integers. The sequence of
numbers starts from 0 by default, and counts
by incrementing 1(by default), and ends at a
specified number.
It is widely used count controlled loops.
In the syntax below, the range() function
takes one, two, or three parameters.
The last two parameters are optional.