wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Lesson 3 - Using Variables

Total questions: 11

Worksheet time: 6mins

Name
Class
Date
1.

What is a Variable in programming?

a)

A name given to data that is stored

b)

Something that changes

c)

Something that stays the same

d)

x

2.

What is a string?

a)

Pictures

b)

A shape

c)

Words

d)

The name for the lines that Turtle draws

3.

x = 30

2x = ?

a)

15

b)

30

c)

60

d)

xx

4.

henry = 50

3henry = ?

a)

50

b)

100

c)

150

d)

henryhenryhenry

5.

dog = “woof”

2dog = ?

a)

dogdog

b)

woofwoof

c)

"woofwoof"

d)

woof2

6.

What is wrong with the code below?


colour = input(“What is your favourite colour?”)

a)

Colour should be spelt color

b)

Doesn't need brackets

c)

Doesn't need speech marks

d)

Nothing is wrong with this code

7.

What is an input used for?

a)

Words

b)

Numbers

c)

Decimals

d)

All of the above

8.

What is an integer used for?

a)

Words

b)

Numbers

c)

Decimals

d)

All of the above

9.

What does the code 'int' mean?

a)

integral

b)

integer

c)

international

d)

into

10.

Is int needed in this code below?


sides = int(input(“How many sides would you like?”))

a)

Yes

b)

No

c)

Maybe

d)

Sometimes

11.

What is wrong with the following code?


sides = integer input(How many sides would you like?)

a)

No speech marks

b)

integer

c)

Needs brackets

d)

Nothing is wrong with this code