Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store

Flow of Control Class 11 Computer Science Chapter 6 CBSE Notes 2025-26

ffImage
banner
widget title icon
Latest Updates

Computer Science Notes for Chapter 6 Flow of Control Class 11- FREE PDF Download

CBSE Class 11 Computer Science Notes Chapter 6 are designed to make your revision easy and effective. These notes highlight important concepts, definitions, and examples in a simple, student-friendly format.


In this chapter, you’ll explore key Computer Science concepts that form the building blocks for future learning. The notes focus on clarity and quick recall, helping you prepare for your CBSE exams confidently.


With Vedantu’s well-structured revision notes, you can review the essential topics efficiently and stay organized right before your exams. Make the most of your study sessions with these concise and reliable summaries.


Revision Notes for Class 11 Computer Science Chapter 6 Flow of Control

In every Python program, the order in which statements are executed is known as the flow of control. By default, Python executes each statement one by one from top to bottom, forming a sequence. However, practical programs often require making decisions and repeating steps, which is where control structures like selection (if statements) and repetition (loops) come into play.

Selection and Decision Making in Python

Sometimes, a program needs to choose between different paths, just like a person making decisions based on conditions. Python uses the if statement to check conditions and perform actions accordingly. The basic syntax for an if statement is:

if condition:
    statements

If statements can be extended using else and elif (else if) to handle multiple choices or cases. For example, to check whether someone is eligible to vote, the code uses if-else:

age = int(input("Enter your age: "))
if age >= 18:
    print("Eligible to vote")
else:
    print("Not eligible to vote")

If several choices exist, if-elif-else chains can check them one by one. When a condition matches, its statements run, and the rest are skipped. This structure is used in problems like classifying a number as positive, negative, or zero, or providing traffic signal instructions based on the entered color.

Working with Positive Difference and Calculators

To ensure subtraction results are always positive, decision-making statements help compare the values first. A simple calculator program typically combines selection statements with user input to perform addition, subtraction, multiplication, and division based on the user's choice.

# Four function calculator
result = 0
val1 = float(input("Enter value 1: "))
val2 = float(input("Enter value 2: "))
op = input("Enter any one of the operator (+,-,*,/): ")
if op == "+":
    result = val1 + val2
elif op == "-":
    result = abs(val1 - val2)
elif op == "*":
    result = val1 * val2
elif op == "/":
    if val2 == 0:
        print("Error! Division by zero is not allowed. Program terminated")
    else:
        result = val1/val2
else:
    print("Wrong input, program terminated")
print("The result is ", result)

Such examples show how selection statements make programs more interactive and responsive to user inputs.

Indentation: Structure in Python Code

Instead of curly braces or specific keywords to group related statements, Python relies on indentation. All statements within an if, else, or loop must be indented at the same level. Indentation is critical for code clarity and correct execution. Incorrect indentation can cause errors or change the logic of a program.

if num1 > num2:
    print("first number is larger")
    print("Bye")
else:
    print("second number is larger")
    print("Bye Bye")

Every block, whether for selection or loops, starts after a colon and continues until the next statement with less indentation.

Repetition: Loops for Iteration

Very often, we need to repeat actions in programs, like printing numbers from 1 to 10, or checking each item in a list. Such repetition is managed using loops. Python provides two main types of loops: for and while.

  • For loop: Repeats a block for every item in a sequence or for a given range of numbers.
  • While loop: Keeps executing its block as long as a condition is true.

The for loop is especially useful when the number of iterations is known or can be calculated. For example, to print all characters in a word:

for letter in 'PYTHON':
    print(letter)

To process numbers in a specific order or range, the range() function is often used. For example, range(5) represents numbers from 0 to 4. range(start, stop, step) can define a starting point, ending point, and step size.

Working with Range

The range() function produces sequences for loops. Here are some common uses:

  • Counting upwards: range(5) gives 0,1,2,3,4
  • Counting with a step: range(2, 10, 2) gives 2,4,6,8
  • Counting backwards: range(10, 0, -2) gives 10,8,6,4,2
# Print multiples of 10 from 10 to 40
for num in range(1,5):
    print(num * 10)

Applying range() and loops together lets us work efficiently with large sets of data or sequences.

While Loop

A while loop is ideal when the number of repetitions is not fixed and depends on a condition, such as reading user input until a certain response is given. For instance:

count = 1
while count <= 5:
    print(count)
    count += 1

While loops are also useful when an action continues until a particular condition becomes false, such as checking for the factors of a number or summing numbers until a negative number is entered.

Break and Continue Statements

Inside loops, the break statement provides a way to exit the loop immediately, regardless of whether the loop condition is still true. This is useful, for example, to stop searching as soon as a required value is found. By contrast, the continue statement skips the current iteration and moves the control back to the start of the loop for the next item.

  • break: Immediately leaves the loop when a certain condition is met.
  • continue: Skips the rest of the current loop iteration but keeps looping.

For example, to sum numbers until the user enters a negative value, break terminates the loop when such input is detected. Similarly, to print all numbers except a particular value, continue can be used inside the loop.

Nested Loops

When a loop is placed inside another loop, it is called a nested loop. This structure allows for handling complex tasks such as printing patterns, searching multi-dimensional data, or generating multiplication tables. Both for and while loops can be nested.

# Print a triangle pattern with nested loops
for i in range(1, n+1):
    for j in range(1, i+1):
        print(j, end=" ")
    print() 

Nested loops can also be used to find prime numbers within a range, by checking divisibility for each candidate number using an inner loop.

Practice and Application

Exercises at the end of the chapter test understanding of concepts such as the difference between else and elif, the purpose of range(), and how break and continue work. Students are also encouraged to write programs, such as printing patterns, checking palindrome numbers, input validation, and implementing a grading system using selection statements.

  • Writing menu-driven programs using loops and selection statements
  • Using loops to generate number sequences and calculate sums
  • Applying control flow to real-life problems like mark percentage calculation and grading

Case studies extend concepts into real-world scenarios, such as extending a school management information system (SMIS) to process and analyze student grades based on input marks. Programs developed from these exercises reinforce how flow of control enables flexibility and problem-solving.

Key Takeaways

  • Selection statements like if, elif, and else allow decision-making in programs.
  • Repeating code efficiently is done through for and while loops, often combined with range().
  • Proper indentation is crucial in Python to define logical blocks of code.
  • break and continue enhance control inside loops, enabling abrupt exit or skipping iterations.
  • Nested loops can solve more complex problems, such as patterns, tables, and multidimensional searches.
  • The flow of control provides flexibility, efficiency, and relevance to real-world programming questions for students.

Mastering the flow of control is vital for writing logical and efficient Python programs, making these concepts a foundation for all advanced programming topics.

Class 11 Computer Science Chapter 6 Notes – Flow of Control: Key Points for Quick Revision

These revision notes on Flow of Control from Class 11 Computer Science cover all important concepts, including selection, loops, and indentation, exactly as explained in the NCERT. With structured points and solved code examples, students can quickly recall how Python flow control makes programs flexible and interactive.


By using these notes, you’ll find it easier to remember key definitions, syntaxes, and use-cases for if-else statements, loops, and break/continue. The clear examples and tips will help you answer both theoretical and practical exam questions with confidence.


FAQs on Flow of Control Class 11 Computer Science Chapter 6 CBSE Notes 2025-26

2. Are stepwise solutions required in CBSE exams?

Yes, stepwise solutions are essential in CBSE exams. Examiners give marks for every correct step shown in your answer. Always write answers in logical steps, especially for programming and structured questions, to match the CBSE marking scheme and maximise your score.

4. How do I structure long answers for better marks?

Start your long answers with a short introduction, follow with main points in order, and end with a summary. Use headings, bullets, or numbered steps where possible. This structure mirrors the chapter-wise solutions approach and makes your answers easier for examiners to mark step by step.

5. Where can I download the chapter’s solutions PDF?

You can download the free PDF of CBSE Class 11 Computer Science Chapter 6 revision notes from the official Vedantu page for offline study. The PDF includes step-by-step solutions and exercise-wise answers as per the current syllabus—very useful for quick last-minute revision.

6. What are common mistakes to avoid in Computer Science revision notes?

Avoid skipping definitions, missing diagram labels, or writing answers without clear steps. Do not copy directly without understanding. Always check your answers match the CBSE marking scheme and highlight key terms. Reviewing your revision notes helps spot and correct such mistakes early.

7. How can revision notes help improve exam performance in Chapter 6?

Revision notes help you quickly recall key topics, definitions, and diagrams before exams. They provide stepwise, structured answers based on CBSE marking. Use them for last-minute brushing up, to target important questions, and to avoid common errors listed in the notes for this chapter.