wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Coding revision

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

What is a variable in programming?

a)

A variable is a type of function in programming.

b)

A variable is a named storage location in memory that can hold a value that can change.

c)

A variable is a fixed value that cannot change.

d)

A variable is a command that executes a program.

2.

Which of these can a "Repeat until" block NOT be used with?

a)

Event Blocks

b)

Sensing Blocks

c)

Operator Blocks

d)

Motion blocks

3.

What does a conditional statement do?

a)

A conditional statement makes the program follow instructions based on conditions.

b)

A conditional statement always executes all code blocks.

c)

A conditional statement is used to declare variables.

d)

A conditional statement generates random numbers.

4.

What does the "change y by -10" block do?

a)

It makes my sprite move left

b)

It makes my sprite move up

c)

It makes my sprite move right

d)

It makes my sprite move down.

5.

What is the purpose of a loop?

a)

To create a single instance of a variable.

b)

The purpose of a loop is to automate repetitive tasks in programming.

c)

To define a function in programming.

d)

To store data in a database.

6.

Another name for a "hat block" is...

a)

control block

b)

sensing block

c)

wait block

d)

event block

7.

What is an example of a conditional statement?

a)

Repeat until my variable = 5.

b)

When I receive message "Go"....

c)

IF touching sprite 1 THEN go to x 0:y 0

d)

When the green flag is pressed...

8.

What do you call a variable that holds text?

a)

String variable

b)

Number variable

c)

Boolean variable

9.

What is the difference between a variable and a constant?

a)

Both variables and constants can change their values under certain conditions.

b)

A variable is a fixed value, while a constant can change its value.

c)

A variable is always a number, while a constant can be any data type.

d)

A variable can change its value, while a constant remains the same.

10.

What do you call the area on the coding interface where you can see your sprite move?

a)

coding tab

b)

stage

c)

extension tab

d)

script

11.

What will happen if the condition in an 'if' statement is false?

a)

The code inside the 'if' statement is not executed.

b)

The condition will be re-evaluated until it is true.

c)

The program will crash immediately.

d)

The code inside the 'if' statement is executed instead.

12.

What is an infinite loop?

a)

A loop that runs for a fixed number of iterations.

b)

A loop that terminates after a specific condition is met.

c)

A loop that executes only once.

d)

An infinite loop is a loop that never ends.

13.

What is the output of the following code: print(5 > 3)?

a)

False

b)

5 < 3

c)

3 > 5

d)

True

14.

What do we use to store data in programming?

a)

Loops

b)

Functions

c)

Variables, arrays, lists, dictionaries, and databases

d)

Conditions

15.

What is the purpose of the 'else' statement?

a)

The 'else' statement is used to terminate a loop.

b)

The 'else' statement is used to declare variables.

c)

The 'else' statement is a way to define a function.

d)

The 'else' statement defines an alternative action when an 'if' condition is false.

16.

What is the primary purpose of using a loop in programming?

a)

To handle exceptions.

b)

To execute a block of code multiple times.

c)

To declare a constant value.

d)

To manage memory allocation.

17.

What is the first step in writing a program?

a)

Write the code directly.

b)

Define the problem or task.

c)

Choose a programming language.

d)

Test the program before writing it.

18.

Which coding blocks will I use to do mathematical calculations?

a)

Event blocks

b)

Control

c)

Looks

d)

Operator blocks

19.

Where will your sprite go after the green flag is pressed?

a)

Bottom right of the screen

b)

Top Left of the Screen

c)

Top Right of the screen

d)

Bottom left of the screen

20.

What will your sprite say when this code is executed?

a)

The total amount of vehicles is 16

b)

The total amount of vehicles is Bikes+Cars