Font size
WorksheetsUnit 3 Code.org Question Bank for FOC
Total questions: 80
Worksheet time: 47mins
Two functions in a single program can have different names but contain identical code.
True
False
The way that sprites' properties are used in Game Lab, by connecting the sprite and property with a dot.
Dot Notation
Declare Command
Initialize
Variable
By chance, not planned or prearranged; irregular
variable
random
property
sprite
True or False .The following is a valid label name.
size_of _eye
True
False
True or False. The following is a valid label name.
petalsize
True
False
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
Which of the following is a correct example of a counter pattern?
sprite.scale = 10
sprite.x = sprite.x + 10
sprite.rotation = .5
If you wanted to make a sprite twice as big as it currently looks which code would you use?
sprite.y
sprite.scale
sprite.rotation
sprite.setAnimattion
What keyboard key do you need press to move the sprite?
x
y
up arrow
space
Which direction will the sprite move in the code pictured? (Click on picture to enlarge.)
Left
Right
Up
Down
The code in the image is an example of
an IF Statement
a DrawLoop
the counter pattern
reducing the size of a sprite
What is the NAME and starting Y LOCATION of this sprite?
dog, 150
dog, 350
fido, 150
fido, 350
In which direction will the sprite move?
bee.y = bee.y - 2
left
right
up
down
What is width of the rectangle in the following code?
rect(250, 200, 75, 225);
250
200
75
225
Which sprite property would you change to make the sprite turn in a circle?
sprite.x
sprite.y
sprite.scale
sprite.rotation
What is the (x, y) location of the palette?
(0, 0)
(200, 200)
(100, 300)
(300, 100)
error
Compare the rotation of the top row to the bottom row.
What is the rotation of the green car?
Definition: sprite.rotation = #;
Clockwise rotation in degrees of the sprite.
A positive value will rotate clockwise, a negative value will rotate counterclockwise. The rotation usually will be a number between -360 and 360.
car.rotation = 0;
car.rotation = 90;
car.rotation = 180;
car.rotation = 270;
car.rotation = 360;
Compare the rotation of the top row to the bottom row.
What is the rotation of the orange car?
Definition: sprite.rotation = #;
Clockwise rotation in degrees of the sprite.
A positive value will rotate clockwise, a negative value will rotate counterclockwise. The rotation usually will be a number between -360 and 360.
car.rotation = 0;
car.rotation = 90;
car.rotation = -90;
car.rotation = 270;
car.rotation = -270;
What is cowSmall.scale=?
var cowBig = createSprite(150, 150);
cowBig.setAnimation("cow");
cowBig.scale = 1;
var cowSmall = createSprite(250, 250);
cowSmall.setAnimation("cow");
cowSmall.scale = ?;
0.5
1.0
1.5
2.0
None of the above
What is cowSmall.scale=?
var cowBig = createSprite(150, 150);
cowBig.setAnimation("cow");
cowBig.scale = 1;
var cowSmall = createSprite(250, 250);
cowSmall.setAnimation("cow");
cowSmall.scale = ?;
0.5
1.0
1.5
2.0
None of the above
What is fishBlue.scale=?
var fishGold = createSprite(100, 100);
fishGold.setAnimation("fish");
fishGold.tint='gold';
fishGold.scale = 1.0;
var fishBlue = createSprite(200, 200);
fishBlue.setAnimation("fish");
fishBlue.tint='blue';
fishBlue.scale = ?;
0.5
1.0
2.0
None of the above
Which car is going up (to the top of the screen)?
blue
green
red
yellow
none of the above
Which car is going to the left?
blue
green
red
yellow
none of the above
Select the statements that are needed to move the mouse diagonally from the right top corner to the left bottom corner.
mouse.x = mouse.x + 2;
mouse.x = mouse.x - 2;
mouse.y = mouse.y + 2;
mouse.y = mouse.y - 2;
Select the statements that are needed to move the mouse diagonally from the right bottom corner to the left top corner.
mouse.x = mouse.x + 2;
mouse.x = mouse.x - 2;
mouse.y = mouse.y + 2;
mouse.y = mouse.y - 2;
Select the statement for the pan to rotate clockwise.
pan.x = pan.x - 1
pan.rotation = pan.rotation - 1
pan.rotation = pan.rotation + 1
pan.x = pan.x + 1
Which fish is swimming the fastest?
orangeFish.x = orangeFish.x - 2
blueFish.x = blueFish.x - 3
greenFish.x = greenFish.x - 1
Cannot be determined
If I wanted Franklyn to be a mermaid with orange hair, will Franklyn appear that way?
Yes, I did everything I should.
No, Franklyn is supposed to be a green monster.
Yes, but Franklyn will have purple hair.
No, I forgot to assign an animation to my sprite.
Where will Franklyn appear? (All options have Franklyn represented as a square.)
This code will draw a pink monster. Which of the pictures is drawn correctly?
What are the rules you need to follow when naming variables?
Labels cannot include spaces. Labels cannot begin with a number.
Labels cannot include spaces. Labels cannot begin with a number. Be very careful with spelling. Labels are case sensitive.
Labels are case-sensitive. Labels need to be spelled correctly.
Labels should be in camel case. Labels should be spelled correctly. Labels cannot begin with a number.
Which of these has the x axis labeled correctly?
What is the center of my grid?
(0, 0)
(400, 400)
(200, 200)
(250, 250)
Which of these pictures best captures the overall shape of the ellipse in this code?
Which of the numbers represents the height of the ellipse?
200
100
300
150
What direction would the following code move in?
bird.velocityX = -5
up
left
right
it doesn't move
What direction would the following code move in?
bird.velocityY = -5
up
down
left
right
it doesn't move
What direction would the following code move in?
bird.velocityY = 5
bird.velocityX = 5
up and left
down and left
down and right
up and right
What is the initial value for rotationSpeed?
180
0
1
360
What is the initial value for velocityX?
60
1
0
-1
A sprite named bird is moving to the right at a rapid speed. What block would you use to get the bird to stop moving?
bird.rotationSpeed = 0
bird.velocityX = 0
bird.velocityY = 0
bird.Y = 0
To make a sprite rotate at a speed of 3 degrees,
you would use the block:
sprite.rotationSpeed = _? Fill in the blank
(a)
What direction would the following code move in?
bird.velocityY = 5
bird.velocityX = -5
up and left
down and left
down and right
up and right
In the code below, what is the condition?
bee.velocityX = -5
if
bee.x > 200
bee.velocityX = 5
In the code below, when does the bee move to the left?
When bee.x = 100
When bee.x = 0
When bee.x = 300
When bee.x = 200
In the code below, when does the bee move to the right?
When bee.x = 100
When bee.x = 0
When bee.x = 300
When bee.x = 200
What direction would the following code move in?
bird.velocityX = 0
up
down
left
right
it wouldn't move
The car goes right.
and is speeding up.
The car goes right.
and is slowing down.
The car goes right, slows down and then goes backward.
The car goes right, slows down and then stops.
The car goes right.
and is speeding up.
The car goes right.
and is slowing down.
The car goes right, slows down and then goes backward.
The car goes right, slows down and then stops.
The car goes left, slows down and stops.
The car goes right, slows down and stops.
The car goes down, slows down and stops.
The car goes up, slows down and stops.
Makes the sprite push the target as long as they are touching each other. The sprite keeps moving normally.
sprite.displace(tgt);
sprite.collide(tgt);
sprite.bounce(tgt);
sprite.bounceOff(tgt);
Makes the sprite stop when it runs into the target. If the target is moving, it will push the sprite with it. The target keeps moving as before.
sprite.displace(tgt);
sprite.collide(tgt);
sprite.bounce(tgt);
sprite.bounceOff(tgt);
Makes the sprite and the target bounce when they touch each other. Both the sprite and the target change how they are moving.
sprite.displace(tgt);
sprite.collide(tgt);
sprite.bounce(tgt);
sprite.bounceOff(tgt);
Makes the sprite bounce off the target when they touch each other. The target keeps moving as before.
sprite.displace(tgt);
sprite.collide(tgt);
sprite.bounce(tgt);
sprite.bounceOff(tgt);
What is the start and stop for the red arc?
Hint: For both angles, 0 degrees is to the right. 90 degrees is down. 180 degrees is to the left. 270 degrees is up. The arc is always drawn clockwise from wherever start falls to wherever stop falls on the ellipse.
arc(x, y, w, h, 180, 270);
arc(x, y, w, h, 270, 0);
arc(x, y, w, h, 0, 90);
arc(x, y, w, h, 90, 180);
What is the start and stop for the green arc?
Hint: For both angles, 0 degrees is to the right. 90 degrees is down. 180 degrees is to the left. 270 degrees is up. The arc is always drawn clockwise from wherever start falls to wherever stop falls on the ellipse.
arc(x, y, w, h, 180, 270);
arc(x, y, w, h, 270, 0);
arc(x, y, w, h, 0, 90);
arc(x, y, w, h, 90, 180);
What is the start and stop for the blue arc?
Hint: For both angles, 0 degrees is to the right. 90 degrees is down. 180 degrees is to the left. 270 degrees is up. The arc is always drawn clockwise from wherever start falls to wherever stop falls on the ellipse.
arc(x, y, w, h, 180, 270);
arc(x, y, w, h, 270, 0);
arc(x, y, w, h, 0, 90);
arc(x, y, w, h, 90, 180);
What is the start and stop for the yellow arc?
Hint: For both angles, 0 degrees is to the right. 90 degrees is down. 180 degrees is to the left. 270 degrees is up. The arc is always drawn clockwise from wherever start falls to wherever stop falls on the ellipse.
arc(x, y, w, h, 180, 270);
arc(x, y, w, h, 270, 0);
arc(x, y, w, h, 0, 90);
arc(x, y, w, h, 90, 180);
Identify the statement for the red arc.
arc(400, 0, 200, 200, 90, 180);
arc(0, 400, 200, 200, 270, 0);
arc(0, 0, 200, 200, 0, 90);
arc(400, 400, 200, 200, 180, 270);
Identify the statement for the yellow arc.
arc(400, 0, 200, 200, 90, 180);
arc(0, 400, 200, 200, 270, 0);
arc(0, 0, 200, 200, 0, 90);
arc(400, 400, 200, 200, 180, 270);
Identify the statement for the blue arc.
arc(400, 0, 200, 200, 90, 180);
arc(0, 400, 200, 200, 270, 0);
arc(0, 0, 200, 200, 0, 90);
arc(400, 400, 200, 200, 180, 270);
Identify the statement for the green arc.
arc(400, 0, 200, 200, 90, 180);
arc(0, 400, 200, 200, 270, 0);
arc(0, 0, 200, 200, 0, 90);
arc(400, 400, 200, 200, 180, 270);
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.
Which line of code is most likely to return an error?
1
2
3
4
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.
What code do we add to make the elephant push the hippo off the screen?
