wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Coding Test #2

Total questions: 39

Worksheet time: 37mins

Name
Class
Date
1.

Variables are NOT surrounded by quotes. We refer to the variable's value by using its name alone.

a)

True

b)

False

2.

The variable before each question stores a string that does not get read or interpreted by the program.

a)

True

b)

False

3.

Match the definition to the correct vocabulary word.

a)

a variable that stores the input that a user enters in an Ask text box

1.

input variable

b)

a letter, number, word, or sentence in quotation marks; strings appear green in the Codesters code editor

2.

string

c)

the syntax for assigning an action to a specific sprite using its variable name

3.

dot natation

d)

a variable that stores a string value

4.

string variable

4.

True or False:

Python will NOT automatically include a space between strings. Students must include that space in the string.

a)

True

b)

False

5.

True or False: Students can NOT use variables as arguments in .say( ) commands to make the sprite say the value of the variable.

a)

false

b)

true

6.

True or False:

NONE of the text of a .say( ) command, strings and variables, must go inside the parentheses that follow the command.

a)

False

b)

True

7.

True or False:

You NEED to put quotes around variable names.

a)

True

b)

False

8.

Match the correct definition to the vocabulary word:

a)

the process of combining two strings together with the + operator

1.

string concatenation

b)

a variable that stores an integer (whole number) value

2.

integer variable

c)

a variable that stores a string (text) value

3.

string variable

d)

an integer, string, or variable that controls how a command is run

4.

argument

9.

True or False:

We can use a variable as an argument to control the size of multiple objects. Variables appear orange in the Codesters code editor and should NOT be surrounded by quotes.

a)

True

b)

False

10.

True or False:

Programs run in order from bottom to top.

a)

False

b)

True

11.

True or False:

Variables MUST be created before they can be used.

a)

True

b)

False

12.

True or False:

Variable names cannot contain spaces. To use two words in a variable names, replace spaces with underscores.

a)

False

b)

True

13.

Match the definition to the correct vocabulary word:

a)

a block of code that will only run when a certain action happens

1.

event

b)

a name that stores a value

2.

variable

c)

the word to the left of the equals sign that identifies a specific variable

3.

variable name

d)

the string we use in a sprite command to get specific images from the Codesters library; sprite = codesters.Sprite("cat") will display the sprite with the "cat" image label

4.

image label

14.

True or False:

When a command has multiple arguments, the arguments must be separated by commas.

a)

True

b)

False

15.

True or False:

Integers are NOT surrounded by quotes.

a)

True

b)

False

16.

True or False:

Strings never are surrounded by quotes.

a)

False

b)

True

17.

True or False:

We can use a sprite's variable name to assign actions to a sprite. This is called dot notation.

a)

True

b)

False

18.

True or False:

You must use a sprite's variable name BEHIND the action command you want to assign.

a)

True

b)

False

19.

True or False:

You must NOT use the correct variable name when assigning actions to a sprite.

a)

True

b)

False

20.

True or False:

The variable name sprite is the default sprite variable name in Codesters. If you change a sprite's name, you must also change the variable name in front of any command that you want to assign to that sprite.

a)

True

b)

False

21.

A letter, word, or sentence in quotation marks is called a _____.

a)

string

b)

input

c)

variable

d)

integer

22.

What symbol do you use to concatenate (join) two strings?

a)

-

b)

+

c)

=

d)

*

23.

True or False:

You can use an .ask( ) command WITHOUT a sprite.

a)

True

b)

False

24.

This stores the text that the user inputs in an Ask command

a)

input string

b)

input variable

c)

input integer

d)

input sprite

25.

True or False:

User input is NEVER a string

a)

False

b)

True

26.

You’re helping a friend with their code and see an input variable named input.

What feedback should you give?

a)

All the variables should be named input

b)

The sprite should say every input variable

c)

This variable name is too general and should be more specific & descriptive

d)

You should keep the name, but make sure only one variable is named input

27.

Choose the best definition of a variable.

a)

A collection of letters or number surrounded by quotes.

b)

A positive or negative number with no fractional part.

c)

A name that stores a value.

d)

A character on the stage.

28.

An integer variable is a variable that stores a(n) _____ value.

a)

word

b)

text

c)

object

d)

integer number

29.

A string Variable is a variable that stores a(n) ______ value.

a)

word

b)

text

c)

object

d)

number

30.

Variables are ____ in the code editor and not surrounded by quotes.

a)

red

b)

yellow

c)

orange

d)

blue

31.

Which term is NOT part of a variable creation statement?

a)

Name

b)

Equal Sign

c)

Value

d)

Stage

32.

Why are variables useful in programming?

a)

They always make your code easier to read

b)

You are less likely to have syntax errors

c)

Cause big changes in your program with only a small change in the code

d)

You can only use each variable once

33.

Choose the best definition of a variable.

a)

a collection of letters or number surrounded by quotes

b)

a positive or negative number with no fractional part.

c)

a name that stores a value

d)

a character on the stage

34.

A string variable is a variable that stores a ____ value.

a)

word

b)

text

c)

object

d)

number

35.

Variables are ____ in the code editor and not surrounded by quotes.

a)

red

b)

yellow

c)

orange

d)

blue

36.

To control the location, size, or color of a shape, you edit its:

a)

arguments

b)

perimeter

c)

objects

d)

comment

37.

How can we use dot notation?

a)

We can use it to make dots on the screen.

b)

We can use it before a command to give the command to a specific sprite.

c)

We can use it to assign the same command to multiple sprites at once

d)

We use it to change the variable names of sprites

38.

The variable before the dot is the...

a)

actor

b)

action

39.

The command after the dot is the...

a)

actor

b)

action