Font size
WorksheetsCode.org Unit 3 Games and Animations
Total questions: 151
Worksheet time: 2hrs 32mins
The _ block will plot a square at the x and y coordinates it is given.
ellipse
rect
fill
background
The _ block will plot a circle at the x and y coordinates it is given.
ellipse
rect
fill
background
Part of a program that does not work correctly.
Bug
Debugging
Program
Variable
Finding and fixing problems in an algorithm or program.
Bug
Debugging
Variable
Parameter
An algorithm that has been coded into something that can be run by a machine.
Bug
Debugging
Program
Parameter
An extra piece of information passed to a function to customize it for a specific need.
Bug
Program
Parameter
Variable
A placeholder for a piece of information that can change.
Program
Parameter
Variable
Debugging
A label looks like sizeOfRectangle or aReallyLongLabelName.
label
camelCase
var score
frame
Labels cannot include spaces.
True
False
Labels can begin with a number.
True
False
Labels are not case-sensitive.
True
False
A graphic character on the screen with properties that describe its location, movement, and look.
Animation
Sprite
A series of images that create the illusion of motion by being shown
rapidly one after the other
Animation
Sprite
A single image within an animation
Property
Frame
Frame Rate
sprite
The rate at which frames in an animation are shown, typically measured in frames per second
property
frame
frame rate
animation
This is an example of code used to fly an image across the screen. This is called a_
animation
frame rate
counter pattern
movement
The common programming structure that implements "conditional statements".
If-Statement
Boolean Expression
Boolean
A generic term for code that alters program flow based on true/false values (like an if statement)
If-Statement
Boolean
Conditional
Boolean Expression
_ is simply a computer science-y term that means a true/false value.
Boolean
Boolean Expression
Boolean Value
_ is a statement that evaluates to a Boolean value (a single true/false).
Boolean
Boolean Expression
Boolean Value
In programming, an expression that evaluates to True or False.
Boolean
Boolean Expression
Boolean Value
The _ block will plot a square at the x and y coordinates it is given.
ellipse
rect
fill
background
The _ block will plot a circle at the x and y coordinates it is given.
ellipse
rect
fill
background
Part of a program that does not work correctly.
Bug
Debugging
Program
Variable
Finding and fixing problems in an algorithm or program.
Bug
Debugging
Variable
Parameter
An algorithm that has been coded into something that can be run by a machine.
Bug
Debugging
Program
Parameter
An extra piece of information passed to a function to customize it for a specific need.
Bug
Program
Parameter
Variable
A placeholder for a piece of information that can change.
Program
Parameter
Variable
Debugging
A label looks like sizeOfRectangle or aReallyLongLabelName.
label
camelCase
var score
frame
Labels cannot include spaces.
True
False
Labels can begin with a number.
True
False
Labels are not case-sensitive.
True
False
A graphic character on the screen with properties that describe its location, movement, and look.
Animation
Sprite
A series of images that create the illusion of motion by being shown
rapidly one after the other
Animation
Sprite
A single image within an animation
Property
Frame
Frame Rate
sprite
The rate at which frames in an animation are shown, typically measured in frames per second
property
frame
frame rate
animation
This is an example of code used to fly an image across the screen. This is called a_
animation
frame rate
counter pattern
movement
The common programming structure that implements "conditional statements".
If-Statement
Boolean Expression
Boolean
A generic term for code that alters program flow based on true/false values (like an if statement)
If-Statement
Boolean
Conditional
Boolean Expression
_ is simply a computer science-y term that means a true/false value.
Boolean
Boolean Expression
Boolean Value
_ is a statement that evaluates to a Boolean value (a single true/false).
Boolean
Boolean Expression
Boolean Value
In programming, an expression that evaluates to True or False.
Boolean
Boolean Expression
Boolean Value
How are shapes plotted on the screen?
with alphabet letters
with X and Y coordinates
using a touch screen
with width and height values
The screen is set up like a grid, and every point on the screen has a corresponding...
picture
shape
Y and Z value
X and Y value
What is the definition of the origin?
An original component
Where x and y equal 100
Where the x and y values equal zero
The end of a story
The x value represents...
How far away from the left of the screen
How far away from the right of the screen
How far away from the top of the screen
How far away from the bottom of the screen
The y value represents...
How far away from the right of the screen
How far away from the left of the screen
How far away from the bottom of the screen
How far away from the top of the screen
What is the origin of a square or rectangle?
The bottom right corner
The bottom left corner
The top right corner
The top left corner
What is the origin of a circle or ellipse?
The bottom left corner
The center
The bottom right corner
The top
In this line of code:
rect(250, 100);
which number is the y value?
rect
250
100
What will this line of code make?
rect(100, 100, 50, 50)
a rectangle
a square
a circle
a star
In this line of code: rect(250, 250, 100, 50); what do 100 and 50 represent?
The x and y values
The w and h values
Given rect(x, y, w, h); what are w and h?
width and heavy
width and tallness
width and length
width and height
What will this line of code make?
rect(100, 100, 50, 200)
a rectangle
a square
a triangle
a circle
The line of code: background("red"); will change what red?
Any shapes on the screen
The background
The foreground
Nothing
What line of code will change the color of any shapes coded below it?
color
rect
weight
fill
What does the randomNumber line of code do?
picks the same number every time
picks any number from zero to infinity
picks any number from the minimum and maximum that you set
it doesn't do anything
randomNumber(0 ,400)
this will randomly pick a number...
between 0 and 400, not including 0 or 400
between 0 and 400, including 0 and 400
Can you use the randomNumber line of code to replace a single value, such as a y value?
Yes!
No!
A variable is a way to...
label a number
save a name
generate a random number
This line of code does what?
var hello = 100
creates a variable
names or labels the variable "hello"
sets the value of the variable hello to 100
All three are correct
What will the console log say when this program is run?
"Starting my program!"
"You clicked the button!"
"Ending my program!"
"Starting my program!"
"Ending my program!"
"You clicked the button!"
"You clicked the button!"
"Starting my program!"
"Ending my program!"
"You clicked the button!"
"Ending my program!"
"Starting my program!"
After the program is run, what will the text color of smallButton be?
red
blue
green
yellow
Which of the following is not one of the purposes of having potential users test a program or app?
To write the code for the program/app.
To see if there are any bugs in the program/app.
To get input on the design of the program/app.
To see how a user interacts with the app/program.
If the user clicks the button, what color will "topButton" be when the program finishes running?
red
green
blue
orange
When this program is run, the user clicks "topButton" then "bottomButton" and then "topButton" again. What will be displayed in the console?
aaa
bbb
ccc
aaa
aaa
ccc
bbb
aaa
ccc
aaa
bbb
aaa
aaa
bbb
aaa
ccc
Which line of code is most likely to return an error?
1
2
3
4
Which of the following describes "event-driven programming?"
Commands run one at a time in the order that they are written.
Commands run one at a time in response to user interactions or other events.
Commands all run at the same time when the user interacts with the app.
Commands all run whether or not the user interacts with the program.
What is a reason to include comments in a program?
Comments tell the computer what the code is doing.
Comments tell the programmer what the code is doing.
Comments help the user work an app more effectively.
Comments will show up in the console so when the program is run, the programmer know what happens.
The X and Y part of these blocks help us.....
place any shape or sprite in a specific area on the screen.
change how big or small the shape or sprite is
move the shapes
create a new plot
The W and H part of these blocks help us.....
place any shape or sprite in a specific area on the screen.
change how wide or tall the shape or sprite is
move the shapes
create a new plot
How do we use this block in code.org?
We have to place this block by a shape or sprite in order to change its size.
We use this to change all colors
We have to put this block at the end of the code
We have to place this block by a shape or sprite in order to change its color.
What does this block do and how do we use it?
What does this block do and how do we use it?
Tell me what this block does for us in code.org.
It is important for the sprite to have the small name and be spelled correctly when using it throughout your code.
True
False
Scale block zooms in the sprite or shape
rotation block spins the sprite or shape
True
False
What does this block do in code.org?
(a)
This blocks allows us to
Change the location of text
Change the zoom of text
Change the size of text
Change the scale of text
What will this block help you do in Code.org?
Change
Color development
Change the color of the background
background movement
A part of the program that does not work correctly.
Bug
Break
Loop
What is a list of steps that you can follow to finish a task?
Code
Program
Algorithm
Predict what will show up on console.log
true true true
true false false
false false false
true false true
A student wants to make a sprite appear. The students begins with "var sprite = createSprite(200,300)". What is the next step?
Add a "drawSprites" command
Add a "sprite.setAnimation" command
Add a "sprite.x" command
Add a "sprite.y" command
Which command is necessary to make a sprite move across the screen from right to left?
if then
sprite.x = sprite.x + 2 ;
sprite.x = sprite.x - 2 ;
sprite.y = sprite.y + 2 ;
Match the block code to the correct description.
a plane moves up and a jet moves across the screen
a blue sky and two planes are made without motion
a plane moves across and a jet moves up
The plane and the jet move together across the screen
Based on this code, where will the fly appear at the start of the code?
Top left
Top right
Bottom left
Bottom right
Based on this code, in which direction will the fly be moving?
From up to down
From down to up
From left to right
From right to left
Which code will make the sprite rotate in a circle clockwise?
sprite.rotation
sprite.rotation = sprite.rotation - 2
sprite.rotate = rotate +2
sprite.rotation = sprite.rotation + 2
If you write a command that can be answered true or false, it is known as a
boolean phrase
conditional statement
an if/then statement
an and/or statement
Which of the following is a boolean phrase ? (mark all correct answers)
On a scale from 0 to 10 how high is your confidence using block coding to make a sprite move across the screen?
0-2
3-5
6-8
9-10
On a scale from 0 to 10 how high is your confidence using text coding to make a sprite move across the screen?
0-2
3-5
6-8
9-10
The text command for a loop function is function draw ( ) { }
TRUE
FALSE
In which corner, will the square in line 1 be located on the coordinate plane? (a)
In which corner, will the square in line 2 be located in the coordinate plane? (a)
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.
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)
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.
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.
There are 3 conditions for creating a variable label. Choose all 3 below.
Labels can't have spaces.
Labels can't have symbols
Labels can't start with a number.
Capitalization and spelling must be the same.
Why will this code not run?
there has to be a number in the variable
there are supposed to be no spaces in the variable label
there are no caps in variables
Why is the randomNumber block useful in coding?
the random numbers will cause the code to spin
the random numbers will cause the sprite to change colors
random numbers can cause the sprite to change depending on which parameter it has been placed into
There will be (a) different sets of text that will appear in (b) different places.
Sprites are drawn in the order they are created. (a)
What does this block do in code.org?
(a)
Which line of code is most likely to return an error?
What is a reason to include comments in a program?
Comments tell the computer what the code is doing.
Comments tell the programmer what the code is doing & why.
Comments will tell the program how to fix bugs.
Comments will help find bugs in the program.
A label for a piece of information used in a program.
Property
Variable
initialize
command
How can we correct the code above? We are getting the error message (dessert is defined, but it is not called in your program)
Change drink to dessert in the 6th line of code
Change drink to ice cream in the 6th line of code
Change drink to sprite in the 6th in of code
variable
A graphic character on the screen with properties that describe its location, movement, and look.
a series of images that create the illusion of motion by being shown rapidly one after the other
a single image within an animation
A placeholder for a piece of information that can change.
What is x value in the following code?
rect(250, 200, 75, 225);
250
200
75
225
What is height of the rectangle in the following code?
rect(250, 200, 75, 225);
250
200
75
225
What is width of the rectangle in the following code?
rect(250, 200, 75, 225);
250
200
75
225
Given rect(x, y, w, h); what are w and h?
width and heavy
width and tallness
width and length
width and height
In this line of code: rect(250, 250, 100, 50); what do 100 and 50 represent?
The x and y values
The w and h values
In this line of code:
rect(250, 100);
which number is the y value?
rect
250
100
What line of code will change the color of any shapes coded below it?
color
rect
weight
fill
The command for coloring the shape comes before drawing the shape
True
False
What is the placement of the rectangles?
Which square will appear on top?
Green
Blue
There are no squares
It combines the color to make turquoise
Which color ellipse appears at the bottom?
Green
Yellow
Red
It's not an ellipse, it's a rectangle
Why doesn't the purple square show?
The yellow square is too big
There is no purple sprite
The background covers the purple square
The purple square needs to be bigger.
Which number will correct the grass to extend across the screen?
A
B
C
D
What is the value of "C"?
150
100
200
No Value
Which variable has a random number?
petalSize
background
ellipse
petals
Each time this program is run, what changes on the elipse?
X value
Y value
Size
Location
Which sprite name is using camel case naming convention?
Toprightsprite
topRightSprite
Top Right Sprite
ToPRighTSpriTE
Which sprite moves left and right?
pencil
brush
background
There are no sprites
What is a sprite?
A label for a characteristic
Properties used in game Lab
A character on the screen with properties
A sugar drink
If I want to update the sprite's property to make it look like it's shaking. Which line of code will I need?
sprite.x
sprite.rotation
sprite.y
createSprite
What will the sprite do in this program?
spin off the screen
float down
nothing, there is a bug
spin in place
Which gear spins counter clockwise?
redGear
blueGear
greenGear
yellowGear
What happens to the apple when it reaches size 2?
It turns into a pear
the program ends
it turns into a bigger apple
nothing
What happens when the left key is pressed?
The fish move right
The fish move left
The fish move up
The fish move down
