Font size
WorksheetsPrograms and Variables in Code and Play
Total questions: 7
Worksheet time: 4mins
True or false?
A program is a set of actions executed by a computer.
True
False
Programs consist of instructions, declarations, and expressions. What is a declaration?
a declaration of love
an explanation of something new to a computer.
an explanation of in the form of comments
an explanation of what is still to come
What is an instructions? Mark everything that is true about instructions
a number or string or some math expression
Instructions are executed in order, one by one
Write each instruction in a new line
Instructions usually end with parentheses and a semicolon
What is true about variables?
Variables are just labeled pieces of data
Examples of variables are numbers or strings
Variables can be changed during the program execution
Variables keep everything the same
To declare a new variable we use special word
int
var
dec
new
To use variables in the code we just write their name. Which may be examples?
var x = 3;
move(x);
move(x + 12);
int 5
Which statements are true?
We can pass arguments inside the parentheses.
Arguments are always expressions.
If we have the command "print", which prints a number to the screen, we should pass this number as an argument (example: print(34)).
The robot will argument back
