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 SheetPractice questions
- Question 1Q-5002BCSee the answer and solution
What is printed by the following Python code? x = 7 if x > 10: print("A") elif x > 5: print("B") else: print("C")
- A.A
- B.B
- C.C
- D.No output
- Question 2Q-931778See the answer and solution
What is the output of the following Python code? for i in range(1, 6): if i % 2 == 0: continue print(i, end=" ")
- A.1 2 3 4 5
- B.2 4
- C.1 3 5
- D.5 3 1
- Question 3Q-A455C7See the answer and solution
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
elseblock of the loop is or is not executed. - Question 4Q-B220ADSee the answer and solution
What is printed by the following Python code? x = 3 while x < 10: x += 2 if x == 7: break print(x)
- A.5
- B.7
- C.9
- D.10
- Question 5Q-DC9105See the answer and solution
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)
- A.1
- B.2
- C.3
- D.6
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 freeFree to start · No credit card needed