WorksheetsPython Loop Statements
Total questions: 10
Worksheet time: 6mins
The loop statements are used to ____________.
Make a decision
execute the same code repeatedly
to jump from one line to another
to perform IO operations
What is the output of the code?
Hello
Error
Hello for infinite times
prints nothing
Select the iterative statements in python.
while
if
for
do-while
for loop in python works on _____________.
range
iterable data
both range and iterable data
any data
Select the statements that check condition in python
while
for
do-while
if
elif
What is the output of the following code?
1 2 3 4
1 2 3 4 5
1
5
Which statement is used to comeout come out of a loop?
exit
continue
break
all the bove
What is the output of the code?
1 2 3 4
1 2 3 4 5
4
5
none of the above
Select the non-loop statements in python
while
do-while
for
if
The loop in python must end with _______.
semi-colon
colon
comma
All of the above
