Flow of Control – NCERT Class 11 Computer Science Chapter 6 – Conditional and Looping Constructs in Python
Explains how Python manages the order of execution of statements using control structures. Covers conditional statements (if, if-else, if-elif), indentation rules, and looping constructs (for and while). Introduces range() function, nested loops, and the use of break and continue statements with various examples. Highlights flowcharts, iteration logic, and pattern generation for better understanding of program control flow.
Updated: 9 months ago

Flow of Control
Chapter 6: Enhanced NCERT Class 11 Guide | Expanded Precise Notes from Full PDF, Detailed Explanations, Diagrams, Examples & Quiz 2025
Enhanced Full Chapter Summary & Precise Notes from NCERT PDF (22 Pages)
Overview & Key Concepts
Exact Definition: "The order of execution of the statements in a program is known as flow of control. The flow of control can be implemented using control structures. Python supports two types of control structures—selection and repetition."
- Introduction: Sequence from Ch 5; Bus analogy (Fig 6.1); Quote: G. van Rossum on indentation.
- Chapter Structure: Selection (if/else/elif), Indentation, Repetition (for/while), Break/Continue, Nested Loops.
- 2025 Relevance: Control in AI loops (e.g., TensorFlow training); Indentation in VS Code; Nested for data processing.
6.1 Introduction to Flow of Control
Precise: Sequential execution; Control structures: Selection/Repetition. Expanded: Program 6-1 (difference); Flow like bus route.
Precise Fig 6.1: Bus to School (SVG)
Program 6-1: Difference of Two Numbers
Output:
Enter first number 5
Enter second number 7
The difference of 5 and 7 is -2
6.2 Selection
Precise: Decision making (if/else/elif); Positive difference (Prog 6-2); Flowchart Fig 6.2. Expanded: Nested if in calculator (Prog 6-3).
Precise Fig 6.2: Decision Flowchart (SVG)
Program 6-2: Positive Difference
Output:
Enter first number: 5
Enter second number: 6
The difference of 5 and 6 is 1
Program 6-3: Simple Calculator
Output:
Enter value 1: 84
Enter value 2: 4
Enter any one of the operator (+,-,*,/): /
The result is 21.0
Example 6.1: if Syntax
Example 6.2: if-elif-else (Positive/Negative/Zero)
Example 6.3: Traffic Signal
6.3 Indentation
Precise: Whitespace for blocks; Strict check; Single tab common. Expanded: Prog 6-4 shows blocks.
Program 6-4: Larger of Two Numbers
Output:
second number is larger
Bye Bye
6.4 Repetition
Precise: Loops for iteration; Butterfly cycle (Fig 6.3); For/While. Expanded: Prog 6-5 (sequence); Range() function.
Precise Fig 6.3: Iterative Process (SVG)
Program 6-5: First Five Natural Numbers
Output:
1
2
3
4
5
Program 6-6: Print 'PYTHON' Characters
Output:
P
Y
T
H
O
N
Program 6-7: Print Sequence [10,20,30,40,50]
Output:
10
20
30
40
50
Program 6-8: Even Numbers
Output:
2 is an even Number
4 is an even Number
6 is an even Number
8 is an even Number
10 is an even Number
Example 6.4: range() Function
Program 6-9: Multiples of 10
Output:
10
20
30
40
Precise Fig 6.4: For Loop Flowchart (SVG)
Program 6-10: First 5 Natural (While)
Output:
1
2
3
4
5
Program 6-11: Factors of Number
Output:
Enter a number to find its factors : 6
1 2 3 6
Precise Fig 6.5: While Loop Flowchart (SVG)
6.5 Break and Continue
Precise: Break: Exit loop; Continue: Skip iteration. Expanded: Prog 6-12 (break at 8); Prog 6-13 (sum positives); Prog 6-14 (prime check).
Precise Fig 6.6: Break Flowchart (SVG)
Program 6-12: Break Demo
Output:
Num has value 1
Num has value 2
Num has value 3
Num has value 4
Num has value 5
Num has value 6
Num has value 7
Encountered break!! Out of loop
Program 6-13: Sum Positives
Output:
Enter numbers to find their sum, negative number ends the loop:
3
4
5
-1
Sum = 12
Program 6-14: Prime Check
Output 1:
Enter the number to be checked: 20
20 is not a prime number
Output 2:
Enter the number to check: 19
19 is a prime number
Precise Fig 6.7: Continue Flowchart (SVG)
Program 6-15: Continue Demo
Output:
Num has value 1
Num has value 2
Num has value 4
Num has value 5
Num has value 6
End of loop
6.6 Nested Loops
Precise: Loop inside loop; No limit on levels. Expanded: Prog 6-16 (nested for); Prog 6-17 (pattern); Prog 6-18 (primes 2-50); Prog 6-19 (factorial).
Program 6-16: Nested For
Output:
Iteration 1 of outer loop
1
2
Out of inner loop
Iteration 2 of outer loop
1
2
Out of inner loop
Iteration 3 of outer loop
1
2
Out of inner loop
Out of outer loop
Program 6-17: Pattern
Output:
Enter a number to generate its pattern = 5
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
Program 6-18: Primes 2-50
Output:
2 is a prime number
3 is a prime number
5 is a prime number
7 is a prime number
11 is a prime number
13 is a prime number
17 is a prime number
19 is a prime number
23 is a prime number
29 is a prime number
31 is a prime number
37 is a prime number
41 is a prime number
43 is a prime number
47 is a prime number
Bye Bye!!
Program 6-19: Factorial
Output:
Enter a number: 5
Factorial of 5 is 120
Enhanced Features (2025)
Full PDF integration, expanded programs (6-1 to 6-19), SVGs (Figs 6.1-6.7), detailed tables/examples, 30 Q&A updated, 10-Q quiz. Focus: Hands-on control flow.
Exam Tips
Write programs (positive diff/prime/pattern); Explain syntax/flowcharts; Differentiate for/while; Use break/continue in code; Nested loop examples.



As an Amazon Associate, ProSyllabus earns from qualifying purchases. Prices shown are subject to change.
Test your CBSE Class 11 Annual Assessment prep
Dual AI-verified questions Real exam pattern 2 quizzes free, then 10 credits per quiz
Constitution: Why and How?
What is Psychology?
India – Location
Nomadic Empires
Animal Kingdom
The Living World
Mother's Day
A Photograph
Methods of Enquiry in Psychology
Election and Representation
Political Theory: An Introduction
An Empire Across Three Continents
Plant Kingdom
Biological Classification
Motion in a Straight Line
Accountancy (Class 11) Practice Quiz | CBSE Class 11 Annual Assessment
Sets and Venn Operations Fundamentals — Free CBSE Class 11 Annual Assessment Quiz
The Summer of the Beautiful White Horse
The Laburnum Top
Discovering Tut: the Saga Continues
We're Not Afraid to Die... if We Can All Be Together
The Portrait of a Lady
Learning
Federalism
Rights in the Indian Constitution
Social Justice
Freedom
Water in the Atmosphere
Changing Cultural Traditions
Writing and City Life
Indian Economy 1950-1990
Introduction
Private, Public and Global Enterprises
Introduction to Accounting
Cell: The Unit of Life
Anatomy of Flowering Plants
Organic Chemistry – Some Basic Principles and Techniques
Redox Reactions
Motion in a Plane
Units and Measurement
The Tale of Melon City
Birth
The Address
Father to Son
Silk Road
The Adventure
Childhood
The Ailing Planet: the Green Movement's Role
The Voice of the Rain
Motivation and Emotion
Thinking
Human Memory
Sensory, Attentional and Perceptual Processes
Human Development
Indian Sociologists
Introducing Western Sociologists
Environment and Society
Social Change and Social Order in Rural and Urban Society
Social Structure, Stratification and Social Processes in Society
Doing Sociology: Research Methods
Culture and Socialisation
Understanding Social Institutions
Terms, Concepts and Their Use in Sociology
Sociology and Society
The Philosophy of the Constitution
Constitution as a Living Document
Local Governments
Judiciary
Legislature
Executive
Secularism
Nationalism
Citizenship
Rights
Equality
Natural Hazards and Disasters
Natural Vegetation
Climate
Drainage System
Structure and Physiography
Biodiversity and Conservation
Movements of Ocean Water
Water (Oceans)
World Climate and Climate Change
Atmospheric Circulation and Weather Systems
Solar Radiation, Heat Balance and Temperature
Composition and Structure of Atmosphere
Landforms and their Evolution
Geomorphic Processes
Distribution of Oceans and Continents
Interior of the Earth
The Origin and Evolution of the Earth
Geography as a Discipline
Paths to Modernisation
Displacing Indigenous Peoples
The Three Orders
Comparative Development Experiences of India and its Neighbours
Environment and Sustainable Development
Employment: Growth, Informalisation and Other Issues
Rural Development
Human Capital Formation in India
Liberalisation, Privatisation and Globalisation: An Appraisal
Indian Economy on the Eve of Independence
Use of Statistical Tools
Index Numbers
Correlation
Measures of Central Tendency
Presentation of Data
Organisation of Data
Collection of Data
International Business
Internal Trade
MSME and Business Entrepreneurship
Sources of Business Finance
Formation of a Company
Social Responsibilities of Business and Business Ethics
Emerging Modes of Business
Business Services
Forms of Business Organisation
Business, Trade and Commerce
Financial Statements - II
Financial Statements - I
Depreciation, Provisions and Reserves
Trial Balance and Rectification of Errors
Bank Reconciliation Statement
Recording of Transactions - II
Recording of Transactions - I
Theory Base of Accounting
Probability
Statistics
Limits and Derivatives
Introduction to Three Dimensional Geometry
Conic Sections
Straight Lines
Sequences and Series
Binomial Theorem
Permutations and Combinations
Linear Inequalities
Complex Numbers and Quadratic Equations
Relations and Functions
Sets
Chemical Coordination and Integration
Neural Control and Coordination
Locomotion and Movement
Excretory Products and their Elimination
Body Fluids and Circulation
Breathing and Exchange of Gases
Plant Growth and Development
Respiration in Plants
Photosynthesis in Higher Plants
Cell Cycle and Cell Division
Biomolecules
Structural Organisation in Animals
Morphology of Flowering Plants
Hydrocarbons
Equilibrium
Chemical Bonding and Molecular Structure
Classification of Elements and Periodicity in Properties
Some Basic Concepts of Chemistry
Waves
Oscillations
Kinetic Theory
Thermodynamics
Thermal Properties of Matter
Mechanical Properties of Fluids
Mechanical Properties of Solids
Gravitation
Systems of Particles and Rotational Motion
Work, Energy and Power
Trigonometric Functions
Structure of Atom
Laws of Motion
Business Studies (Class 11) Practice Quiz | CBSE Class 11 Annual Assessment
Economics (Class 11) Practice Quiz | CBSE Class 11 Annual Assessment
Humanities Subjects Practice Quiz | CBSE Class 11 Annual Assessment
Motion in a Straight Line Practice Quiz | CBSE Class 11 Annual Assessment
Thermodynamic Processes and Laws Advanced Challenge | CBSE Class 11 Annual Assessment

Group Discussions
No forum posts available.


