WorksheetsCS Final
Total questions: 9
Worksheet time: 5mins
Of the following, which statement(s) is(are) true?
The console will definitely display "Winner!"
The console will not display "Winner!" because raceCar.x will never be less than 100
The console will not display "Winner!" because the if () statement is missing an else () statement
The console will not display "Winner!" because (raceCar.x < 100) cannot be evaluated to TRUE or FALSE
Of the following, which statement(s) is(are) true?
The console will definitely display "Winner!"
The console will not display "Winner!" because raceCar.x will never be less than 100
The console will not display "Winner!" because the if () statement is missing an else () statement
The console will not display "Winner!" because (raceCar.x = 100) cannot be evaluated to TRUE or FALSE
What would you expect to happen when this code runs? (choose all that apply)
The fish, at first, will do nothing. It's waiting for user input.
When the left arrow key is pressed, the fish will go left.
When the right arrow key is pressed, the fish will go right.
When the up arrow key is pressed, the fish will go up.
When the down arrow key is pressed the fish will go down.
Which lines of code demonstrate "the counter" pattern? (choose all that apply)
function draw( ) {
raccoon = raccoon + 2;
function draw( ) {
raccoon = 2;
function draw( ) {
raccoon.velocity = 2;
function draw( ) {
raccoon.x = raccoon.x - 2;
What would you expect to happen when this code runs?
An image of an apple gets bigger and bigger until suddenly it turns into a pear , and then the pear keeps getting bigger.
An image of an apple gets bigger and bigger until suddenly it turns into a pear and starts shrinking (getting smaller).
An image of an apple takes up the whole screen at first, then gets smaller and smaller until it suddenly turns into a pear and continues to shrink
Nothing will happen because something very important is missing.
What is an "abstraction"?
a "simple" representation of something more complicated
a technique for making sprites interact with each other
something that requires a higher level of skill to make
a new way to do something that is more efficient than the old way
What will you see when you run this program?
A pear will drop from the sky. When it touches the blender, it will bounce off of the blender.
A pear will drop from the sky. When it touches the blender, the apple and the blender will both disappear
An apple will drop from the sky. When it touches the blender, it will turn the blender green.
An apple will drop from the sky. When it touches the blender, the blender will shake.
"L'il Labcoat", a popular new music artist, is also a very good coder. He's creating a game where you find animals hidden in the jungle. He notices that he's writing the same code over and over again for when the player has to take something out of their virtual "backpack". What advice would you give him to save him some work? (Keep in mind- there is a correct answer here)
write a function named getFromBackpack( )
create a variable named getFromBackpack
use an IF ELSE statement
use the counter pattern
What will the following code do? (choose all that apply)
draw a blue gear on the left side of the screen
draw a blue gear on the right side of the screen
the gear will turn when user clicks the left mouse button
the gear will start turning as soon as the program loads.
none of these
