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.



























