Chapter 9 Flow of Control
Chapter 9 Flow of Control
Nalkheda
Subject: Computer Science
Class: 11
Chapter : 9
Time: 3 hours Maximum Marks: 50
General Instructions:
* All questions are compulsory.
* Read each question carefully before answering.
* Write your answers neatly and legibly.
* Use appropriate indentation and spacing to make your code readable.
* Diagrams and flowcharts should be drawn neatly and labeled clearly.
Section A (15 marks)
* Multiple Choice Questions (5 marks)
(a) Which of the following is not a loop control statement in Python?
(i) break
(ii) continue
(iii) goto
(iv) pass
(b) What is the output of the following code?
for i in range(1, 5):
if i == 3:
break
print(i)
(i) 1 2 3
(ii) 1 2
(iii) 1 2 3 4
(iv) 1 2 3 4 5
(c) Which loop is most suitable for iterating over a sequence of numbers?
(i) while loop
(ii) for loop
(iii) do-while loop
(iv) nested loop
(d) What is the purpose of the continue statement in a loop?
(i) To exit the loop immediately
(ii) To skip the current iteration and continue to the next one
(iii) To repeat the current iteration
(iv) To pause the loop execution
(e) Which of the following is a valid way to define a multi-line comment in Python?
(i) /* This is a comment */
(ii) # This is a comment
(iii) ''' This is a comment '''
(iv) // This is a comment
a.
*
**
***
****
*****