wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Programs and Variables in Code and Play

Total questions: 7

Worksheet time: 4mins

Name
Class
Date
1.

True or false?

A program is a set of actions executed by a computer.

a)

True

b)

False

2.

Programs consist of instructions, declarations, and expressions. What is a declaration?

a)

a declaration of love

b)

an explanation of something new to a computer.

c)

an explanation of in the form of comments

d)

an explanation of what is still to come

3.

What is an instructions? Mark everything that is true about instructions

a)

a number or string or some math expression

b)

Instructions are executed in order, one by one

c)

Write each instruction in a new line

d)

Instructions usually end with parentheses and a semicolon

4.

What is true about variables?

a)

Variables are just labeled pieces of data

b)

Examples of variables are numbers or strings

c)

Variables can be changed during the program execution

d)

Variables keep everything the same

5.

To declare a new variable we use special word

a)

int

b)

var

c)

dec

d)

new

6.

To use variables in the code we just write their name. Which may be examples?

a)

var x = 3;

b)

move(x);

c)

move(x + 12);

d)

int 5

7.

Which statements are true?

a)

We can pass arguments inside the parentheses.

b)

Arguments are always expressions.

c)

If we have the command "print", which prints a number to the screen, we should pass this number as an argument (example: print(34)).

d)

The robot will argument back