Page-4 |
|||
Folw of control |
|||
46)An empty or null statement in Python is ____ | |||
go | pass | ||
over | None | ||
Answer : | |||
|
|||
47)The order of statement executation in the form of top to bottom, is known as _________ construct. | |||
flow | repeatation | ||
selection | sequence | ||
Answer : | |||
|
|||
48)The construct that repeat a set of statements for a specific number of times. | |||
selection | sequence | ||
repeatation | None of these | ||
Answer : | |||
|
|||
49)Which of the following statement will make a selection construct? | |||
for | while | ||
if-else | none of these | ||
Answer : | |||
|
|||
50)Which one of the following will make a repeatation construct? | |||
for | if-else | ||
both (a) and (b) | none of these | ||
Answer : | |||
|
|||
51)The statement that allows to choose statement to be executed based on a condition is known as - | |||
selection | repeatation | ||
sequence | none of these | ||
Answer : | |||
|
|||
52)Which one of the following is not a valid loop in Python? | |||
for | do-while | ||
while | none of these | ||
Answer : | |||
|
|||
|
|||
53)Which of the following statement will terminate the whole loop? | |||
continue | break | ||
pass | go | ||
Answer : | |||
|
|||
54)Which of the statement will terminate the current pass of a loop? | |||
continue | break | ||
pass | go | ||
Answer : | |||
|
|||
55)Consider the following loop-
for i in range(-5): print(i)how many times the loop will execute |
|||
5 | 0 | ||
infinite times | Error | ||
Answer : | |||
|
|||
56)range (3) will yield an iterable sequence- | |||
[ ] | [0,1,2,3] | ||
[0, 1, 2] | [1, 2, 3] | ||
Answer : | |||
|
|||
57)range (3) is equivalent to - | |||
range(1, 3) | range(0,3) | ||
range(0,4) | range(1,4) | ||
Answer : | |||
|
|||
58)What will be the output of the following code?
for k in range(2,6, 2): print(k) |
|||
2, 4, 6 | 2, 4 | ||
2 | 6 | ||
Answer : | |||
|
|||
59)What will be the output of the following code?
k=1 while(k<=6): k*=2 print(k) |
|||
8 | 14 | ||
16 | infinite loop | ||
Answer : | |||
|
|||
60)What will be the value of k after executing the following loop?
for k in range(5): break |
|||
5 | 1 | ||
0 | none of these | ||
Answer : | |||
|