background shapesbackground shapes

Quiz Summary

Loops in Python

Profile Image

Guest

question markRank: 88
question markPoints: 700
Accuracy 70.0%

Want to learn coding and ace these quizzes?

Find a new quiz

Share this in social media

Quiz result

7

Correct

3

Incorrect

Question Performance

1.

The for loop in Python is an _____________?

Entry Controlled Loop

Exit Controlled Loop

Both of the above

None of the above

2.

Break in Python is used ______________?

To restart a loop

Terminate a loop

To jump in between the loop

None of the above

3.

A loop block in python starts with a __?

 ; (semicolon)

 , (comma)

 : (colon)

 # (hash)

4.

Which of the following loop is not supported by the Python programming language?

for loop

while loop

do…while loop

None of the above

5.

Which of the following is not a valid keyword of Python associated with loops?

continue

check

range

break

6.

Select which is true for, for loop

Python’s for loop is used to iterates over the items of list, tuple, dictionary, set, or string

else clause of for loop is executed when the loop terminates naturally

else clause of for loop is executed when the loop terminates abruptly

We use for loop when we want to perform a task indefinitely until a particular condition is met

7.

Which of the following is False regarding loops in Python?

Loops are used to perform certain tasks repeatedly.

while loop is used when multiple statements are executed repeatedly until the given condition becomes true.

while loop is used when multiple statements are executed repeatedly until the given condition becomes false.

for loop can be used to iterate through the elements of lists.

8.

________ in Python is a counter-controlled loop.

for

while

Both (a) and (b)

None of the above

9.

What is another word for iteration?

Selection

Assignment

Sequencing

Repetition

10.
while(1==3):  

 How many times this loop will run?

0

1

2

infinte