Topic: Chapter 6: Control Structures (Test 1)



Topic: Chapter 6: Control Structures
  • «
  • Test: 1(current)
  • «
Q.1
How many important control structures are there in Python?
A. 3
B. 4
C. 5
D. 6
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report
Q.2
elif can be considered to be abbreviation of
A. nested if
B. if..else
C. else if
D. if..elif
Answer : Option C
Explaination / Solution:
No Explaination.


Workspace
Report
Q.3
What plays a vital role in Python programming?
A. Statements
B. Control
C. Structure
D. Indentation
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report
Q.4
Which statement is generally used as a placeholder?
A. continue
B. break
C. pass
D. goto
Answer : Option C
Explaination / Solution:
No Explaination.


Workspace
Report
Q.5
The condition in the if statement should be in the form of
A. Arithmetic or Relational expression
B. Arithmetic or Logical expression
C. Relational or Logical expression
D. Arithmetic
Answer : Option C
Explaination / Solution:
No Explaination.


Workspace
Report
Q.6
Which is the most comfortable loop?
A. do..while
B. while
C. for
D. if..elif
Answer : Option C
Explaination / Solution:
No Explaination.


Workspace
Report
Q.7

What is the output of the following snippet?

i=1

while True:

if i%3 ==0: break

print(i,end='')

i +=1

A. 12
B. 123
C. 1234
D. 124
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report
Q.8

What is the output of the following snippet?

T=1

while T:

print(True)

break

A. False
B. True
C. 0
D. no output
Answer : Option B
Explaination / Solution:
No Explaination.


Workspace
Report
Q.9
Which amongst this is not a jump statement ?
A. for
B. goto
C. continue
D. break
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report
Q.10

Which punctuation should be used in the blank?

if <condition>_

statements-block 1

else:

statements-block 2

A. ;
B. :
C. ::
D. !
Answer : Option B
Explaination / Solution:
No Explaination.


Workspace
Report


  • «
  • Test: 1(current)
  • «