Worksheets*Computer Science Test*
Total questions: 55
Worksheet time: 3hrs 43mins
A part of the program that does not work correctly.
Bug
Break
Loop
Variable
What is debugging?
taking an insect out of the computer or off the screen
finding & fixing a problems in an algorithm or program
breaking down a problem to simple solution
putting commands in a specific order to catch errors
What does run mean?
to make a code for a program
to make a program complete an algorithm
to make a website show up on your screen
to make loops never stop
Using the powers of computers to solve problems.
computer science
computational thinking
for loop
command
The language of computer programming is
Spanish
English
Code
Pig-latin
Which variable is named correctly?
4sides
Sidesfour
sides4
SidesFour
What is x value in the following code?
rect(250, 200, 75, 225);
250
200
75
225
What is y value 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
What is height of the rectangle in the following code?
rect(250, 200, 75, 225);
250
200
75
225
sprite.scale
Controls...
It controls the sprites X position
It controls the sprite's Y position
It controls the size of the sprite
It controls the sprite's rotation
Which sprite property would you change to make the sprite turn in a circle?
sprite.x
sprite.y
sprite.scale
sprite.rotation
A label for a characteristic of a piece of information used in a program or sprite, such as its location and appearance.
Variable
Random
Property
Sprite
A character on the screen with properties that describe its location, movement, and look.
Variable
Property
Random
Sprite
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 are valid label names?
1team
size_of _eye
petalsize
PinkBunny
uploadedImage
What will most likely happen when this code is run?
Everything will be there, except for the sprites, because the programer didn't put drawSprites();
Only the sprites will be there becuase the programer didn't put drawCode();
Nothing will be there because the programer didn't put drawSprites(); or drawCode();
Everything will be there because the programer put all of the needed code
The progarmer had sprites in the code. What could have happened?
They forgot to put drawSprites();
They put the background over them
They put the wrong names in the wrong spots
The animations they put didn't exist
What is the problem in this code? What can you do to fix the problem?
choose 1 green and 1 blue
The background came last, not first.
They didn't put drawSprites();
Move the background to the front of the code.
Add drawSprites();
Something Else
Which random number code is correct?
randomNumber(1, 10)
randomNumber(1, 10);
randomNumber(1, 10):
RandomNumber(1, 10)
randomnumber(1, 10)
randomNumber(1, 10);
what is the minimum
(a)
randomNumber(1, 10);
what is the maximum
(a)
This is what a student wrote on their notes:
____________________________________________
The randomNumber(1, 10); code chooses a random number between the minimum( first #) and maximum (second #)
___________________________________________
Are they correct?
Yes
No
Which is the correct example for the text code?
text("Your Words Here!", x, y);
words("Your Words Here!", x, y);
text("Your Words Here!", x, y)
text(Your Words Here!, x, y);
The purple sprite block ________________.
Determines a sprite
Adds a sprite to the screen
Draws the sprite
Changes the sprites size
The pink sprite block ____________________.
Puts a sprite on the screen
Gets a sprite ready to be put on the screen by drawSprites();
Draws a sprite
Determines a sprite
How are you confident in coding?
Only using blocks:l
Only using text code :l
Using both blocks and text code :)
Not at all :(
I'm not the best or the worst at either :l
What does the "fill()" command do?
Set the color for future shapes
Fills the background with a specified color
Draw a shape with the color specified
Draw a shape that has been previously stated in a variable
What is the difference between "ellipse()" and "rect()"?
rect() draws a rectangle and ellipse() draws a rectangle
rect() draws a rectangle and ellipse() draws a circle
rect() draws a circle and ellipse() draws a circle
rect() draws a polygon and ellipse() draws a triangle
Which of these will create a blue rectangle in the bottom left corner of the screen?
fill("Blue"); rect(50, 350,50,50)
fill("Red); rect(350, 350, 50, 50);
fill("Blue"); rect(200, 200, 50, 50);
fill("Blue"); rect(300, 350, 50, 50);
Variable-
A placeholder for information that can change
A placeholder for information that can't change
An image that can have animations
A way to store your images
What does the DrawSprite function do?
It draws all the sprites in the animation tab
It draws all sprites defined by a variable
It draws a spooky ghost
It defines all the sprites in the animation tab
How do you correctly define a sprite?
var "sprite" createSprite(200,200)
var sprite= createSprite();
var="sprite" createSprite(200,200);
var sprite= createSprite(200, 200);
What will the pencil and brush sprites appear to do in this code?
Randomly redraw left and right on top of themselves
Randomly redraw up and down on top of themselves
Randomly move up and down
Randomly move left and right
Move up smoothly
Move randomly up and down
Move left smoothly
Move right smoothly
Rotate smoothly counterclockwise
Move smoothly up
Move smoothly down
Rotate smoothly clockwise
Move smoothly down and to the left
Move smoothly up and to the left
Move smoothly down and to the right
Move smoothly up and to the right
It creates my Sprite at the coordinates (50, 200)
It makes my Sprite move left and right between 50 and 200
It makes my Sprite move up and down between 50 and 200
It moves my sprite to the coordinates (50, 200)
a green circle
it won't appear because I haven't drawn it yet
a green square
a gray square
It will replace my Sprite with a picture of a bunny
It will make my Sprite appear on the screen
It will make my Sprite appear and disappear
It will make my Sprite look like a plane
It will mark an x next to my Sprite
It will make the y coordinate of my Sprite be 300
It will make my Sprite move 300 spaces to the right
It will make the x coordinate of my Sprite be 300
1st one
2nd one
3rd one
4th one
1st one
2nd one
3rd one
4th one
1st one
2nd one
3rd one
4th one
What would be the correct definition of a bug in computer science?
A fully working program
Something about a moth in an old computer
Something we ate as children
A part of a program that does not work correctly
Missing a )
Missing a (
Missing a >
Missing a ;
Missing a ]
Which property could I use to make my sprite move in a circular motion?
sprite.width
sprite.scale
sprite.rotation
sprite.circle
What is the purpose of the randomNumber(min,max) command?
Returns a random number between your min and max
Returns a number that is outside of your min and max
Returns nothing
Returns a specific number the user put in
What does the y axis do?
Create a random position for the sprite
Moves object in circles
Moves objects to the left and right
Move objects up and down
What does the X axis do?
Moves objects to the left and right
Create random location for objects
Moves objects up and down
Moves object in circles
Which is not a label rule?
Labels are case sensitive
A label cannot have spaces
A label cannot begin with a number
Labels cannot have numbers
Order of code matters
True
False
What is the name of the programming language we are using?
(a)
rect ( y, x, w, h)
rect (h, w , y, x)
rect (w, h, x, y)
rect (x, y, w, h)
