wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

U4 Strings, loops, and slicing - Python

Total questions: 13

Worksheet time: 7mins

Name
Class
Date
1.

What will the program below output:

a)

fire

b)

water

c)

fire

water

d)

None of these

2.

What will the program below output:

a)

good morning

b)

good mornings

c)

good mornings4

d)

Error

3.

What will the program below output:

a)

earth

b)

xarth

c)

xaxth

d)

Error

4.

What will the program below output:

a)

11

b)

10

c)

12

d)

-1

5.

What will the program below output:

a)

3

b)

3

3

c)

10

d)

10

10

6.

What will the program below output:

a)

arbok

b)

ARBOK

c)

There is no method called swapcase()

d)

Error

7.

What will the program below output:

a)

arbok

b)

ARBOK

c)

Arbok

d)

aRBOK

8.

What will the program below output:

a)

no

more

monkeys

jumping

on

the

bed

b)

['no', 'more', 'monkeys', 'jumping', 'on', 'the', 'bed']

c)

Incompatible types error

d)

None of these

9.

What will the program below output:

a)

'no more monkeys'

b)

'   no more monkeys       '

c)

'nomoremonkeys'

d)

n mr mnkys

10.

What will the program below output:

a)

wHAT THE hELLY

b)

What the Helly

c)

What the Sigma

d)

What the Brainrot is going on

11.

What will the program below output:

a)

skellington

b)

skelli

c)

kellingto

d)

error

12.

What will the program below output:

a)

ton

b)

skelli

c)

kellingto

d)

gton

13.

What will the program below output:

a)

skelliton

b)

skelli

c)

skelli skelli

d)

Error