wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Year 7,8,9 Variables

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is the greater than symbol?

a)

>

b)

==

c)

<

d)

!=

2.

What will this code output?

a)

True

b)

stay dry, homie, its tony

c)

bring a brolly

d)

BINLEY MEGA CHIPPEY!!!

3.

== is used to define a variable

a)

True

b)

False

4.

3 > 8

a)

True

b)

False

5.

What will the following code output?

a)

"hello class

b)

ERROR

c)

hello class

d)

print("hello class)

6.

True or False: A boolean is True or False

a)

True

b)

False

7.

What does the if statement do in python?

a)

It stops the program

b)

Stores data within a variable

c)

It checks if a condition has been met

d)

outputs text

8.

What will this code output?

a)

name

b)

John

c)

Greg

d)

Bob

9.

A print statement is a form of output

a)

True

b)

False

10.

Match the following

a)

if statement

1.

checks if a condition has been met

b)

variable

2.

has a name and a value

c)

else statement

3.

if every condition has NOT been met