wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python programming

Total questions: 15

Worksheet time: 4mins

Name
Class
Date
1.

What is the output?

a)

[1, 2, 3] [1, 2, 3, 4]

b)

[1, 2, 3, 4] [1, 2, 3, 4]

c)

[1, 2] [1, 2, 3, 4]

d)

Error

2.

What happens?

a)

Stores successfully

b)

Error: lists are unhashable

c)

Error: dictionary limit reached

d)

None

3.

What is the output?

a)

2.5 and 2

b)

2 and 2.5

c)

2.5 and 2.5

d)

Error

4.

What is the output?

a)

{"a": 1, "b": 2}

b)

{"a": 100, "b": 2}

c)

{"a": 100}

d)

Error

5.

What is the output?

a)

1

b)

"a"

c)

Error

d)

None

6.

What is the output ?

a)

<class 'int'> and <class 'tuple'>

b)

<class 'tuple'> and <class 'tuple'>

c)

<class 'int'> and <class 'int'>

d)

Error

7.

What is the output ?

a)

[5, 4, 3, 2, 1]

b)

[1, 2, 3, 4, 5]

c)

Error

d)

None

8.

What is the output?

a)

None

b)

Error

c)

True

d)

False

9.

What is the output?

a)

1 and 0

b)

True and False

c)

1 and False

d)

Error

10.

What is the output?

a)

2

b)

1

c)

0

d)

3

11.

What is the output ?

a)

abc

b)

applebanana

c)

Error

d)

applecherry

12.

What is the output?

a)

1 4 9

b)

1 2 3

c)

(1, 4, 9)

d)

Error

13.

What is the output?

a)

a 1; b 2;

b)

a; b;

c)

1; 2;

d)

Error

14.

What is the output?

a)

[1, 2, 3, 4, 2, 4, 6, 8]

b)

[1, 2, 3, 4, 2, 4, 6]

c)

[1, 2, 3, 4, 2, 4]

d)

Error

15.

What is the output?

a)

[2]

b)

[1, 2, 3]

c)

[2, 3]

d)

[]