Chapter 6 · Class 11 · CBSE · Science Computer Science

Flow of Control

25 practice questions · 5 marks weightage

Topics in this chapter

  • Conditional Statements and Branching
  • For Loops and Range Function
  • While Loops and Infinite Loops
  • Jump Statements: Break, Continue, and Pass
  • Nested Loops and Complex Iterations
  • Indentation, Block Structure, and Logic

Cheat sheet

Cheat Sheet

Practice questions

  1. Question 1Q-5002BC

    What is printed by the following Python code? x = 7 if x > 10: print("A") elif x > 5: print("B") else: print("C")

    1. A.A
    2. B.B
    3. C.C
    4. D.No output
    See the answer and solution
  2. Question 2Q-931778

    What is the output of the following Python code? for i in range(1, 6): if i % 2 == 0: continue print(i, end=" ")

    1. A.1 2 3 4 5
    2. B.2 4
    3. C.1 3 5
    4. D.5 3 1
    See the answer and solution
  3. Question 3Q-A455C7

    Consider the following Python code: count = 0 for n in range(2, 7): if n % 2 == 0: count += 1 else: continue if count == 2: break else: print("completed") print(count) State the output and explain why the else block of the loop is or is not executed.

    See the answer and solution
  4. Question 4Q-B220AD

    What is printed by the following Python code? x = 3 while x < 10: x += 2 if x == 7: break print(x)

    1. A.5
    2. B.7
    3. C.9
    4. D.10
    See the answer and solution
  5. Question 5Q-DC9105

    What is the output of the following Python code? total = 0 for i in range(1, 4): for j in range(i): if j == 1: break total += 1 print(total)

    1. A.1
    2. B.2
    3. C.3
    4. D.6
    See the answer and solution

20 more questions on Flow of Control

Sign up free to practise the full chapter. Questions you get wrong come back until you've mastered them.

Start practising free

Free to start · No credit card needed