wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Loop Statements

Total questions: 10

Worksheet time: 6mins

Name
Class
Date
1.

The loop statements are used to ____________.

a)

Make a decision

b)

execute the same code repeatedly

c)

to jump from one line to another

d)

to perform IO operations

2.

What is the output of the code?

a)

Hello

b)

Error

c)

Hello for infinite times

d)

prints nothing

3.

Select the iterative statements in python.

a)

while

b)

if

c)

for

d)

do-while

4.

for loop in python works on _____________.

a)

range

b)

iterable data

c)

both range and iterable data

d)

any data

5.

Select the statements that check condition in python

a)

while

b)

for

c)

do-while

d)

if

e)

elif

6.

What is the output of the following code?

a)

1 2 3 4

b)

1 2 3 4 5

c)

1

d)

5

7.

Which statement is used to comeout come out of a loop?

a)

exit

b)

continue

c)

break

d)

all the bove

8.

What is the output of the code?

a)

1 2 3 4

b)

1 2 3 4 5

c)

4

d)

5

e)

none of the above

9.

Select the non-loop statements in python

a)

while

b)

do-while

c)

for

d)

if

10.

The loop in python must end with _______.

a)

semi-colon

b)

colon

c)

comma

d)

All of the above