XI CS WS CH6 Flow of Control 1-23-24
XI CS WS CH6 Flow of Control 1-23-24
CLASS: XI (Worksheet )
Computer Science-083
1. Statements or instructions that are executed one after another in a serial order are called
______________ control flow statements.
2. An iterative statement ________________ a block of statements for specific number of times.
3. _______________________ are used to indent the Python code.
4. The 'else' block will be executed if the condition returns to
5. The _______________loop evaluates the test expression first and then executes the body of the loop.
6. ___________ and ________________ are known as Python Jump Statements.
7. A _____________ statement is the type of statement in Python that does nothing.
8. A loop within the loop is called _____________loop.
9. In Python, loops can have the _____________ clause and it will execute only when the loop
terminates normally.
10. The ______________ statement skips the current iteration and resumes the loop from the next
iteration.
2 _____________ refers to the whitespaces or tabs that are used to place at the beginning of a block
of statements.
a. Comments b. Indentation c. Loops d. Statements
3 Observe the following syntax carefully and state which statement is true:
if <expr> :
<statement>
Page 1 of 3
4 range(8) is equivalent to ___________
a. range(1,8) b. range(0,8) c. range(0,8,2) d. range(1,8,1)
a. 55 54 53 52 51
b. 55 54 53 52 51 50
c. 55 53 51
d. 51 53 55
7 The statement that helps to skip the iteration and resume the loop with the next iteration is called
______________.
a. continue b. break c. exit d. pass
a. 2 b. 3 c. 10 d. 20
1. In the 'if-else' construct, you can place two else statements with one if.
2. You can add multiple 'elif blocks in the 'if-elif-else' statement.
3. The 'in' operator can only be used with the 'for' loop.
4. The range( ) function can only be used with the 'while' loop.
5. The break statement stops the loop in between.
6. The continue statement does nothing and it is called an empty statement.
7. In Python, indentation is required to make the code look good only.
8. The 'while' loop is called an entry-controlled loop.
9. The 'for' loop gets executed at least once in Python.
10. The loop that repeats forever is called an infinite loop.
11. You can also declare the range() function with a negative value.
12. In Python, pass is considered as an empty statement.
13. In Python, comment and pass are similar.
14. A loop within a loop is called a nested loop.
15. You cannot create an 'if-else' block inside another 'if-else' block.
Page 2 of 3
Short Answer Types Questions (2 markers)
1. What is the purpose of range() function? How is the range(10, 20) evaluated?
2. Why is while loop called the entry controlled loop?
3. What is an infinite loop? Give an example.
4. Write a program to obtain a number from user and check whether he has entered a two digit, three
digit or four digit number.
5. What goes the range(start, stop, step_size) function signify?
Page 3 of 3