wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Lesson 10 - Decision control statements

Total questions: 10

Worksheet time: 20mins

Name
Class
Date
1.

What will be the output of following code ?

a)

perfect

b)

imperfect

c)

12

d)

none

2.

What will be the output of the following code ?

a)

26

b)

25

c)

50

d)

none

3.

What is the maximum choices will we have in 2 level nested if else hierarchy ?

a)

3

b)

4

c)

5

d)

6

4.

From the code below write for what condition else block will be executed ?

a)

never execute

b)

when a<18

c)

when a=18

d)

when a>=18

5.

What will be the output of the following code ?

a)

True

b)

False

c)

both True and false

d)

none

6.

What will be the output of following code ?

a)

False

True

b)

True

False

c)

True

d)

Error

7.

what will be the output of the following statement ?

print(str(int(float(int(5.6)))))

a)

'5'

b)

5

c)

'5.6'

d)

5.6

8.

what will be the output of the following statement ?

a)

good morning

b)

good day

c)

both good morning and good day

d)

none

9.

What will be the output of the following code ?

a)

same string

b)

not the same string

c)

both

d)

none

10.

mention two keywords which starts with capital letter ?

a)

True and False

b)

For

c)

While

d)

Is