wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python foundation

Total questions: 10

Worksheet time: 2hrs 40mins

Name
Class
Date
1.

Question: What will the following code output?

a)

55

b)

10

c)

Error

d)

5

2.

Question: What will this code print?

a)

Teenager

b)

Child

c)

Error

d)

Nothing

3.

Question: How many times will the following loop run?

a)

1 time

b)

2 times

c)

3 times

d)

4 times

4.

Question: What is the output of this code?

a)

Hello Alice

b)

Hello

c)

Error

d)

HelloAlice

5.

Question: What will this code output?

a)

apple

b)

banana

c)

cheery

d)

Error

6.

Question: What will this code output?

a)

Pyt

b)

hon

c)

Python

d)

"Py

7.

Question: What will this code output?

a)

"Alice"

b)

"age"

c)

"12"

d)

"name"

8.

Question: What type of error will this code produce?

a)

SyntaxError

b)

ValueError

c)

TypeError

d)

Error

9.

Question: What will this code output?

a)

True

b)

Error

c)

False

d)

None

10.

Question: What will this code output?

a)

0

b)

0,1,2,3

c)

Error

d)

0,1,2