wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Exercise

Total questions: 40

Worksheet time: 20mins

Name
Class
Date
1.

What is a variable in programming?

a)

A fixed number

b)

A storage container for values

c)

A computer part

d)

A symbol

2.

Which of these is an integer?

a)

5.5

b)

"5"

c)

5

d)

True

3.

What type is "Hello"?

a)

int

b)

float

c)

str

d)

bool

4.

What is a Boolean value?

a)

A number

b)

A true/false value

c)

A word

d)

A letter

5.

Which of these represents a float?

a)

12

b)

12.0

c)

"12"

d)

True

6.

In Scratch, what is a sprite?

a)

A code block

b)

A character or object

c)

A variable

d)

A sound

7.

What does str(8) return?

a)

8

b)

"8"

c)

8.0

d)

Error

8.

Which block in Scratch moves a sprite forward?

a)

Turn 15 degrees

b)

Move 10 steps

c)

Say Hello

d)

Go to x:0 y:0

9.

What is the type of False?

a)

float

b)

int

c)

str

d)

bool

10.

What is the correct way to assign a variable in Python?

a)

x = 5

b)

5 = x

c)

x == 5

d)

var x = 5

11.

What type is 3.14?

a)

int

b)

float

c)

bool

d)

str

12.

In Scratch, which block starts the program?

a)

When green flag clicked

b)

Forever

c)

Go to block

d)

Say block

13.

What type is returned by int("6")?

a)

float

b)

int

c)

str

d)

bool

14.

Which is a valid variable name?

a)

2name

b)

name2

c)

@name

d)

class

15.

What does the Scratch block "repeat 10" do?

a)

Stops code

b)

Loops code 10 times

c)

Moves sprite forever

d)

Deletes sprite

16.

What does type(7) return?

a)

int

b)

float

c)

bool

d)

str

17.

Which statement is true about variables?

a)

They cannot change

b)

They store data

c)

They delete data

d)

They play music

18.

In Scratch, which block changes a sprite's appearance?

a)

Change costume

b)

Play sound

c)

Repeat

d)

Move steps

19.

What type is "123"?

a)

int

b)

float

c)

str

d)

bool

20.

What is the value of 15 // 4?

a)

3

b)

4

c)

5

d)

3.75

21.

In Scratch, which block makes a sprite speak text?

a)

Move

b)

Say

c)

Jump

d)

Look

22.

What is the type of True?

a)

float

b)

int

c)

bool

d)

str

23.

Which of these is NOT a Python type?

a)

int

b)

float

c)

sprite

d)

str

24.

What happens when you run: x = 10; x = x + 5?

a)

x becomes 5

b)

x becomes 15

c)

Error

d)

x becomes 105

25.

In Scratch, which block repeats forever?

a)

If block

b)

Repeat block

c)

Forever block

d)

Wait block

26.

What type is returned by float(9)?

a)

int

b)

float

c)

str

d)

bool

27.

Which value is Boolean?

a)

"True"

b)

1

c)

False

d)

"0"

28.

What does a variable do in Scratch?

a)

Plays music

b)

Stores changing values

c)

Creates sprites

d)

Moves objects

29.

What is the output of type("Hi")?

a)

int

b)

str

c)

bool

d)

float

30.

Which of these is an expression?

a)

5 + 3

b)

x = 5

c)

True

d)

"Hello"

31.

What does the Scratch block "change x by 10" do?

a)

Changes variable x

b)

Moves sprite on the x-axis

c)

Changes sound volume

d)

Rotates sprite

32.

What is 8 % 3?

a)

1

b)

3

c)

2

d)

0

33.

A variable in Scratch can:

a)

Store only numbers

b)

Store text and numbers

c)

Only store text

d)

Only store sprites

34.

What is the type of 0.0?

a)

bool

b)

float

c)

int

d)

str

35.

Which Scratch category contains motion blocks?

a)

Events

b)

Motion

c)

Looks

d)

Operators

36.

What does x = "10" store?

a)

An integer

b)

A float

c)

A string

d)

A Boolean

37.

Which is a numeric expression?

a)

"hello"

b)

True

c)

4 * 2

d)

sprite

38.

In Scratch, which block checks conditions?

a)

If block

b)

Repeat block

c)

Say block

d)

Motion block

39.

What is the result of 2 + 2 * 2?

a)

8

b)

6

c)

4

d)

2

40.

What type is returned by type(3.5)?

a)

int

b)

float

c)

str

d)

bool