wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Code.org Unit 3 Games and Animations

Total questions: 151

Worksheet time: 2hrs 32mins

Name
Class
Date
1.

The _ block will plot a square at the x and y coordinates it is given.

a)

ellipse

b)

rect

c)

fill

d)

background

2.

The _ block will plot a circle at the x and y coordinates it is given.

a)

ellipse

b)

rect

c)

fill

d)

background

3.

Part of a program that does not work correctly.

a)

Bug

b)

Debugging

c)

Program

d)

Variable

4.

Finding and fixing problems in an algorithm or program.

a)

Bug

b)

Debugging

c)

Variable

d)

Parameter

5.

An algorithm that has been coded into something that can be run by a machine.

a)

Bug

b)

Debugging

c)

Program

d)

Parameter

6.

An extra piece of information passed to a function to customize it for a specific need.

a)

Bug

b)

Program

c)

Parameter

d)

Variable

7.

A placeholder for a piece of information that can change.

a)

Program

b)

Parameter

c)

Variable

d)

Debugging

8.

A label looks like sizeOfRectangle or aReallyLongLabelName.

a)

label

b)

camelCase

c)

var score

d)

frame

9.

Labels cannot include spaces.

a)

True

b)

False

10.

Labels can begin with a number.

a)

True

b)

False

11.

Labels are not case-sensitive.

a)

True

b)

False

12.

A graphic character on the screen with properties that describe its location, movement, and look.

a)

Animation

b)

Sprite

13.

A series of images that create the illusion of motion by being shown

rapidly one after the other

a)

Animation

b)

Sprite

14.

A single image within an animation

a)

Property

b)

Frame

c)

Frame Rate

d)

sprite

15.

The rate at which frames in an animation are shown, typically measured in frames per second

a)

property

b)

frame

c)

frame rate

d)

animation

16.

This is an example of code used to fly an image across the screen. This is called a_

a)

animation

b)

frame rate

c)

counter pattern

d)

movement

17.

The common programming structure that implements "conditional statements".

a)

If-Statement

b)

Boolean Expression

c)

Boolean

18.

A generic term for code that alters program flow based on true/false values (like an if statement)

a)

If-Statement

b)

Boolean

c)

Conditional

d)

Boolean Expression

19.

_ is simply a computer science-y term that means a true/false value.

a)

Boolean

b)

Boolean Expression

c)

Boolean Value

20.

_ is a statement that evaluates to a Boolean value (a single true/false).

a)

Boolean

b)

Boolean Expression

c)

Boolean Value

21.

In programming, an expression that evaluates to True or False.

a)

Boolean

b)

Boolean Expression

c)

Boolean Value

22.
Program
a)
Attributes that describe an object's characteristics
b)
A graphic character on the screen with properties that describe its location, movement, and look.
c)
An algorithm that has been coded into something that can be run by a machine.
d)
A placeholder for a piece of information that can change.
23.
Parameter
a)
An extra piece of information that you pass to the function to customize it for a specific need.
b)
The common programming structure that implements "conditional statements".
c)
the rate at which frames in an animation are shown, typically measured in frames per second
d)
Pulling out specific differences to make one solution work for multiple problems.
24.
Function
a)
A placeholder for a piece of information that can change.
b)
a series of images that create the illusion of motion by being shown rapidly one after the other
c)
A piece of code that you can easily call over and over again.
d)
Attributes that describe an object's characteristics
25.
Sprite
a)
A graphic character on the screen with properties that describe its location, movement, and look.
b)
 A placeholder for a piece of information that can change.
c)
Attributes that describe an object's characteristics
d)
An algorithm that has been coded into something that can be run by a machine.
26.
Property
a)
Attributes that describe an object's characteristics
b)
An algorithm that has been coded into something that can be run by a machine.
c)
Pulling out specific differences to make one solution work for multiple problems.
d)
An algorithm that has been coded into something that can be run by a machine.
27.
Animation 
a)
The common programming structure that implements "conditional statements".
b)
 a series of images that create the illusion of motion by being shown rapidly one after the other
c)
A graphic character on the screen with properties that describe its location, movement, and look.
d)
Pulling out specific differences to make one solution work for multiple problems
28.
Frame Rate
a)
the rate at which frames in an animation are shown, typically measured in frames per second
b)
Pulling out specific differences to make one solution work for multiple problems.
c)
A graphic character on the screen with properties that describe its location, movement, and look.
d)
A placeholder for a piece of information that can change.
29.
Frame
a)
a single image within an animation
b)
Finding and fixing problems in your algorithm or program.
c)
the rate at which frames in an animation are shown, typically measured in frames per second
d)
in programming, an expression that evaluates to True or False.
30.
Variable
a)
An extra piece of information that you pass to the function to customize it for a specific need.
b)
The common programming structure that implements "conditional statements".
c)
 Attributes that describe an object's characteristics
d)
 A placeholder for a piece of information that can change.
31.
Abstraction
a)
the rate at which frames in an animation are shown, typically measured in frames per second
b)
A graphic character on the screen with properties that describe its location, movement, and look.
c)
Pulling out specific differences to make one solution work for multiple problems.
d)
in programming, an expression that evaluates to True or False.
32.
Boolean
a)
A single value of either TRUE or FALSE
b)
Any valid unit of code that resolves to a value.
c)
Part of a program that does not work correctly.
33.
If-Statement
a)
 The common programming structure that implements "conditional statements".
b)
 Attributes that describe an object's characteristics
c)
An algorithm that has been coded into something that can be run by a machine.
d)
Part of a program that does not work correctly.
34.
Conditionals
a)
Any valid unit of code that resolves to a value.
b)
a single image within an animation
c)
Statements that only run under certain conditions.
d)
Any valid unit of code that resolves to a value.
35.
Bug
a)
Part of a program that does not work correctly.
b)
the rate at which frames in an animation are shown, typically measured in frames per second
c)
An algorithm that has been coded into something that can be run by a machine.
d)
A graphic character on the screen with properties that describe its location, movement, and look.
36.
Boolean Expression
a)
a single image within an animation
b)
A single value of either TRUE or FALSE
c)
A piece of code that you can easily call over and over again.
d)
Finding and fixing problems in your algorithm or program.
37.
Debugging
a)
Finding and fixing problems in your algorithm or program.
b)
Statements that only run under certain conditions.
c)
Any valid unit of code that resolves to a value.
d)
Part of a program that does not work correctly.
38.

The _ block will plot a square at the x and y coordinates it is given.

a)

ellipse

b)

rect

c)

fill

d)

background

39.

The _ block will plot a circle at the x and y coordinates it is given.

a)

ellipse

b)

rect

c)

fill

d)

background

40.

Part of a program that does not work correctly.

a)

Bug

b)

Debugging

c)

Program

d)

Variable

41.

Finding and fixing problems in an algorithm or program.

a)

Bug

b)

Debugging

c)

Variable

d)

Parameter

42.

An algorithm that has been coded into something that can be run by a machine.

a)

Bug

b)

Debugging

c)

Program

d)

Parameter

43.

An extra piece of information passed to a function to customize it for a specific need.

a)

Bug

b)

Program

c)

Parameter

d)

Variable

44.

A placeholder for a piece of information that can change.

a)

Program

b)

Parameter

c)

Variable

d)

Debugging

45.

A label looks like sizeOfRectangle or aReallyLongLabelName.

a)

label

b)

camelCase

c)

var score

d)

frame

46.

Labels cannot include spaces.

a)

True

b)

False

47.

Labels can begin with a number.

a)

True

b)

False

48.

Labels are not case-sensitive.

a)

True

b)

False

49.

A graphic character on the screen with properties that describe its location, movement, and look.

a)

Animation

b)

Sprite

50.

A series of images that create the illusion of motion by being shown

rapidly one after the other

a)

Animation

b)

Sprite

51.

A single image within an animation

a)

Property

b)

Frame

c)

Frame Rate

d)

sprite

52.

The rate at which frames in an animation are shown, typically measured in frames per second

a)

property

b)

frame

c)

frame rate

d)

animation

53.

This is an example of code used to fly an image across the screen. This is called a_

a)

animation

b)

frame rate

c)

counter pattern

d)

movement

54.

The common programming structure that implements "conditional statements".

a)

If-Statement

b)

Boolean Expression

c)

Boolean

55.

A generic term for code that alters program flow based on true/false values (like an if statement)

a)

If-Statement

b)

Boolean

c)

Conditional

d)

Boolean Expression

56.

_ is simply a computer science-y term that means a true/false value.

a)

Boolean

b)

Boolean Expression

c)

Boolean Value

57.

_ is a statement that evaluates to a Boolean value (a single true/false).

a)

Boolean

b)

Boolean Expression

c)

Boolean Value

58.

In programming, an expression that evaluates to True or False.

a)

Boolean

b)

Boolean Expression

c)

Boolean Value

59.

How are shapes plotted on the screen?

a)

with alphabet letters

b)

with X and Y coordinates

c)

using a touch screen

d)

with width and height values

60.

The screen is set up like a grid, and every point on the screen has a corresponding...

a)

picture

b)

shape

c)

Y and Z value

d)

X and Y value

61.

What is the definition of the origin?

a)

An original component

b)

Where x and y equal 100

c)

Where the x and y values equal zero

d)

The end of a story

62.

The x value represents...

a)

How far away from the left of the screen

b)

How far away from the right of the screen

c)

How far away from the top of the screen

d)

How far away from the bottom of the screen

63.

The y value represents...

a)

How far away from the right of the screen

b)

How far away from the left of the screen

c)

How far away from the bottom of the screen

d)

How far away from the top of the screen

64.

What is the origin of a square or rectangle?

a)

The bottom right corner

b)

The bottom left corner

c)

The top right corner

d)

The top left corner

65.

What is the origin of a circle or ellipse?

a)

The bottom left corner

b)

The center

c)

The bottom right corner

d)

The top

66.

In this line of code:

rect(250, 100);

which number is the y value?

a)

rect

b)

250

c)

100

67.

What will this line of code make?

rect(100, 100, 50, 50)

a)

a rectangle

b)

a square

c)

a circle

d)

a star

68.

In this line of code: rect(250, 250, 100, 50); what do 100 and 50 represent?

a)

The x and y values

b)

The w and h values

69.

Given rect(x, y, w, h); what are w and h?

a)

width and heavy

b)

width and tallness

c)

width and length

d)

width and height

70.

What will this line of code make?

rect(100, 100, 50, 200)

a)

a rectangle

b)

a square

c)

a triangle

d)

a circle

71.

The line of code: background("red"); will change what red?

a)

Any shapes on the screen

b)

The background

c)

The foreground

d)

Nothing

72.

What line of code will change the color of any shapes coded below it?

a)

color

b)

rect

c)

weight

d)

fill

73.

What does the randomNumber line of code do?

a)

picks the same number every time

b)

picks any number from zero to infinity

c)

picks any number from the minimum and maximum that you set

d)

it doesn't do anything

74.

randomNumber(0 ,400)

this will randomly pick a number...

a)

between 0 and 400, not including 0 or 400

b)

between 0 and 400, including 0 and 400

75.

Can you use the randomNumber line of code to replace a single value, such as a y value?

a)

Yes!

b)

No!

76.

A variable is a way to...

a)

label a number

b)

save a name

c)

generate a random number

77.

This line of code does what?

var hello = 100

a)

creates a variable

b)

names or labels the variable "hello"

c)

sets the value of the variable hello to 100

d)

All three are correct

78.

What will the console log say when this program is run?

a)

"Starting my program!"

"You clicked the button!"

"Ending my program!"

b)

"Starting my program!"

"Ending my program!"

"You clicked the button!"

c)

"You clicked the button!"

"Starting my program!"

"Ending my program!"

d)

"You clicked the button!"

"Ending my program!"

"Starting my program!"

79.

After the program is run, what will the text color of smallButton be?

a)

red

b)

blue

c)

green

d)

yellow

80.

Which of the following is not one of the purposes of having potential users test a program or app?

a)

To write the code for the program/app.

b)

To see if there are any bugs in the program/app.

c)

To get input on the design of the program/app.

d)

To see how a user interacts with the app/program.

81.

If the user clicks the button, what color will "topButton" be when the program finishes running?

a)

red

b)

green

c)

blue

d)

orange

82.

When this program is run, the user clicks "topButton" then "bottomButton" and then "topButton" again. What will be displayed in the console?

a)

aaa

bbb

ccc

aaa

b)

aaa

ccc

bbb

aaa

c)

ccc

aaa

bbb

aaa

d)

aaa

bbb

aaa

ccc

83.

Which line of code is most likely to return an error?

a)

1

b)

2

c)

3

d)

4

84.

Which of the following describes "event-driven programming?"

a)

Commands run one at a time in the order that they are written.

b)

Commands run one at a time in response to user interactions or other events.

c)

Commands all run at the same time when the user interacts with the app.

d)

Commands all run whether or not the user interacts with the program.

85.

What is a reason to include comments in a program?

a)

Comments tell the computer what the code is doing.

b)

Comments tell the programmer what the code is doing.

c)

Comments help the user work an app more effectively.

d)

Comments will show up in the console so when the program is run, the programmer know what happens.

86.

The X and Y part of these blocks help us.....

a)

place any shape or sprite in a specific area on the screen.

b)

change how big or small the shape or sprite is

c)

move the shapes

d)

create a new plot

87.

The W and H part of these blocks help us.....

a)

place any shape or sprite in a specific area on the screen.

b)

change how wide or tall the shape or sprite is

c)

move the shapes

d)

create a new plot

88.

How do we use this block in code.org?

a)

We have to place this block by a shape or sprite in order to change its size.

b)

We use this to change all colors

c)

We have to put this block at the end of the code

d)

We have to place this block by a shape or sprite in order to change its color.

89.

What does this block do and how do we use it?

4 lines
90.

What does this block do and how do we use it?

4 lines
91.

Tell me what this block does for us in code.org.

4 lines
92.

It is important for the sprite to have the small name and be spelled correctly when using it throughout your code.

a)

True

b)

False

93.

Scale block zooms in the sprite or shape

rotation block spins the sprite or shape

a)

True

b)

False

94.

What does this block do in code.org?

(a)  

95.

This blocks allows us to

a)

Change the location of text

b)

Change the zoom of text

c)

Change the size of text

d)

Change the scale of text

96.

What will this block help you do in Code.org?

a)

Change

b)

Color development

c)

Change the color of the background

d)

background movement

97.

A part of the program that does not work correctly.

a)

Bug

b)

Break

c)

Loop

98.

What is a list of steps that you can follow to finish a task?

a)

Code

b)

Program

c)

Algorithm

99.

Predict what will show up on console.log

a)

true true true

b)

true false false

c)

false false false

d)

true false true

100.

A student wants to make a sprite appear. The students begins with "var sprite = createSprite(200,300)". What is the next step?

a)

Add a "drawSprites" command

b)

Add a "sprite.setAnimation" command

c)

Add a "sprite.x" command

d)

Add a "sprite.y" command

101.

Which command is necessary to make a sprite move across the screen from right to left?

a)

if then

b)

sprite.x = sprite.x + 2 ;

c)

sprite.x = sprite.x - 2 ;

d)

sprite.y = sprite.y + 2 ;

102.

Match the block code to the correct description.

a)

a plane moves up and a jet moves across the screen

b)

a blue sky and two planes are made without motion

c)

a plane moves across and a jet moves up

d)

The plane and the jet move together across the screen

103.

Based on this code, where will the fly appear at the start of the code?

a)

Top left

b)

Top right

c)

Bottom left

d)

Bottom right

104.

Based on this code, in which direction will the fly be moving?

a)

From up to down

b)

From down to up

c)

From left to right

d)

From right to left

105.

Which code will make the sprite rotate in a circle clockwise?

a)

sprite.rotation

b)

sprite.rotation = sprite.rotation - 2

c)

sprite.rotate = rotate +2

d)

sprite.rotation = sprite.rotation + 2

106.

If you write a command that can be answered true or false, it is known as a

a)

boolean phrase

b)

conditional statement

c)

an if/then statement

d)

an and/or statement

107.

Which of the following is a boolean phrase ? (mark all correct answers)

a)
b)
c)
d)
108.

On a scale from 0 to 10 how high is your confidence using block coding to make a sprite move across the screen?

a)

0-2

b)

3-5

c)

6-8

d)

9-10

109.

On a scale from 0 to 10 how high is your confidence using text coding to make a sprite move across the screen?

a)

0-2

b)

3-5

c)

6-8

d)

9-10

110.

The text command for a loop function is function draw ( ) { }

a)

TRUE

b)

FALSE

111.

In which corner, will the square in line 1 be located on the coordinate plane? (a)  

Choose from the below words
upper left
upper right
lower left
lower right
112.

In which corner, will the square in line 2 be located in the coordinate plane? (a)  

Choose from the below words
upper left
upper right
lower left
lower right
113.

The code has to appear in a certain order for the blue and green box to appear layered. The ​ (a)   code will have to appear 1st and the ​ (b)   code will appear 2nd.

Choose from the below words
blue
green
114.

Which line of code would you expect to find the purple square? Remember the purple square is layered on top of the 4 circles. (a)  

Choose from the below words
Line 1
Line 2
Line 3
Line 5
115.

Reorder the following sets of code so the yellow ellipse is behind the green ellipse. Hint: x, y, w, h will help with placing the ellipses.

a)
b)
c)
d)
1)
2)
3)
4)
116.

You have been asked to make the background blue for this set of code. The code for the background would appear on line ​ (a)   because the background is behind the ellipses.

Choose from the below words
1
2
3
4
5
117.

There are 3 conditions for creating a variable label. Choose all 3 below.

a)

Labels can't have spaces.

b)

Labels can't have symbols

c)

Labels can't start with a number.

d)

Capitalization and spelling must be the same.

118.

Why will this code not run?

a)

there has to be a number in the variable

b)

there are supposed to be no spaces in the variable label

c)

there are no caps in variables

119.

Why is the randomNumber block useful in coding?

a)

the random numbers will cause the code to spin

b)

the random numbers will cause the sprite to change colors

c)

random numbers can cause the sprite to change depending on which parameter it has been placed into

120.

There will be ​ (a)   different sets of text that will appear in ​ (b)   different places.

Choose from the below words
two
three
one
121.

Sprites are drawn in the order they are created. (a)  

Choose from the below words
true
false
122.

What does this block do in code.org?

(a)  

123.

Which line of code is most likely to return an error?

124.

What is a reason to include comments in a program?

a)

Comments tell the computer what the code is doing.

b)

Comments tell the programmer what the code is doing & why.

c)

Comments will tell the program how to fix bugs.

d)

Comments will help find bugs in the program.

125.

A label for a piece of information used in a program.

a)

Property

b)

Variable

c)

initialize

d)

command

126.

How can we correct the code above? We are getting the error message (dessert is defined, but it is not called in your program)

a)

Change drink to dessert in the 6th line of code

b)

Change drink to ice cream in the 6th line of code

c)

Change drink to sprite in the 6th in of code

127.

variable

a)

A graphic character on the screen with properties that describe its location, movement, and look.

b)

a series of images that create the illusion of motion by being shown rapidly one after the other

c)

a single image within an animation

d)

A placeholder for a piece of information that can change.

128.

What is x value in the following code?

rect(250, 200, 75, 225);

a)

250

b)

200

c)

75

d)

225

129.

What is height of the rectangle in the following code?

rect(250, 200, 75, 225);

a)

250

b)

200

c)

75

d)

225

130.

What is width of the rectangle in the following code?

rect(250, 200, 75, 225);

a)

250

b)

200

c)

75

d)

225

131.

Given rect(x, y, w, h); what are w and h?

a)

width and heavy

b)

width and tallness

c)

width and length

d)

width and height

132.

In this line of code: rect(250, 250, 100, 50); what do 100 and 50 represent?

a)

The x and y values

b)

The w and h values

133.

In this line of code:

rect(250, 100);

which number is the y value?

a)

rect

b)

250

c)

100

134.

What line of code will change the color of any shapes coded below it?

a)

color

b)

rect

c)

weight

d)

fill

135.

The command for coloring the shape comes before drawing the shape

a)

True

b)

False

136.

What is the placement of the rectangles?

a)
b)
c)
d)
137.

Which square will appear on top?

a)

Green

b)

Blue

c)

There are no squares

d)

It combines the color to make turquoise

138.

Which color ellipse appears at the bottom?

a)

Green

b)

Yellow

c)

Red

d)

It's not an ellipse, it's a rectangle

139.

Why doesn't the purple square show?

a)

The yellow square is too big

b)

There is no purple sprite

c)

The background covers the purple square

d)

The purple square needs to be bigger.

140.

Which number will correct the grass to extend across the screen?

a)

A

b)

B

c)

C

d)

D

141.

What is the value of "C"?

a)

150

b)

100

c)

200

d)

No Value

142.

Which variable has a random number?

a)

petalSize

b)

background

c)

ellipse

d)

petals

143.

Each time this program is run, what changes on the elipse?

a)

X value

b)

Y value

c)

Size

d)

Location

144.

Which sprite name is using camel case naming convention?

a)

Toprightsprite

b)

topRightSprite

c)

Top Right Sprite

d)

ToPRighTSpriTE

145.

Which sprite moves left and right?

a)

pencil

b)

brush

c)

background

d)

There are no sprites

146.

What is a sprite?

a)

A label for a characteristic

b)

Properties used in game Lab

c)

A character on the screen with properties

d)

A sugar drink

147.

If I want to update the sprite's property to make it look like it's shaking. Which line of code will I need?

a)

sprite.x

b)

sprite.rotation

c)

sprite.y

d)

createSprite

148.

What will the sprite do in this program?

a)

spin off the screen

b)

float down

c)

nothing, there is a bug

d)

spin in place

149.

Which gear spins counter clockwise?

a)

redGear

b)

blueGear

c)

greenGear

d)

yellowGear

150.

What happens to the apple when it reaches size 2?

a)

It turns into a pear

b)

the program ends

c)

it turns into a bigger apple

d)

nothing

151.

What happens when the left key is pressed?

a)

The fish move right

b)

The fish move left

c)

The fish move up

d)

The fish move down