wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python: Strings and Lists

Total questions: 12

Worksheet time: 12mins

Name
Class
Date
1.

Q: What does the code print?

a)

der eulb wolley neerg

b)

r b y g

c)

green

d)

red blue yellow green

e)

re blu yello gree

2.

Q: What does the code print?

a)

0 red: 1 blue: 2 yellow: 3 green:

b)

0 r: 1 b: 2 y: 3 g:

c)

1 blue: 3 green: 2 yellow: 0 red:

d)

1 b: 3 gre: 2 ye: 0 :

3.

Q: What does the code print?

a)

0

b)

blue

c)

b

d)

None

4.

Q: What does the code print?

a)

x 0

b)

x 3

c)

li 3

d)

li 0

e)

None of the above

5.

Q: What does the code print?

a)

x 0

b)

a 3

c)

c 1

d)

c 3

e)

None of the above

6.

Q: What does the code print?

a)

0 1 2 3 4 5 6 7 8 9

b)

1 2 3 4 5 6 7 8 9

c)

0 1 2 3 4 5 6 7 8 9 10

d)

1 2 3 4 5 6 7 8 9 10

7.

Q: What does the code print?

a)

1 4 7

b)

1 4 8

c)

1 3 5 7

d)

1 3 5 7 9

8.

Q: What does the code print?

a)

['basketball'] [''basketball', 'softball'] ['baseball', 'swimming'

b)

['basketball'] ['tennis', 'basketball', 'softball'] ['baseball']

c)

['basketball'] ['tennis', 'basketball', 'softball'] ['baseball', 'swimming']

d)

None of the above

9.

Q: What does the code print?

a)

['softball']

b)

te ba so gy so ba sw

c)

['tennis', 'basketball']

d)

ten bas sof gym soc bas swi

e)

None of the above

10.

Q: What does the code print?

a)

['tenni', 'baketball', 'oftball', 'gymnatic', 'occer', 'baeball', 'wimming']

b)

[]

c)

['basketball', 'softball', 'soccer', 'baseball']

d)

None of the above

11.

Q: What does the code print?

a)

I love python

b)

[I, love, python]

c)

['I', 'love', 'python']

d)

None of the above

12.

Q: What does the code print?

a)

ystery quiz

b)

mystery quiz

c)

yst qui

d)

mystery qui

e)

ystery qui