Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

2 Python Variables

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What will this print to the screen?


print(2*4)

a)

2*4

b)

8

c)

4

d)

error

2.

Which is the python logo?

a)

Top left

b)

Bottom left

c)

Top right

d)

Bottom right

3.

What do we use variables for?

a)

To store data

b)

Print data

c)

Produce functions

4.

To get the users input what function do we use?

a)

input

b)

input<>

c)

input()

d)

INPUT()

5.

What does int() represent?

a)

internet

b)

integer

c)

intel

d)

input

6.

Choose what / performs.

a)

multiply

b)

add

c)

subtract

d)

divide

7.

Why would I get a syntax error?

a)

Line 1 doesn't make sense

b)

Line 2 needs to be indented

c)

No need for quotation marks on line 2

d)

No such thing as an if statement

8.

What would be printed to the screen for print(z)?

a)

Orange

b)

Banana

c)

Cherry

d)

Hello World!

9.

What will be printed to the screen?

a)

5

b)

10

c)

5 + 10

d)

15

10.

What will be printed to the screen?

a)

5 + John

b)

Syntax error - you cannot add str and int together

c)

John

d)

JohnJohnJohnJohnJohn