Font size
WorksheetsFall 2022 CS Review
Total questions: 135
Worksheet time: 1hrs 11mins
00100101
00100011
00100111
01000101
17
27
37
47
HINT: It has an 8 and a 4 in it!
What is a binary digit referred to as?
Bit
Bits
Byte
Bytes
Tiny squares of color on a screen.
A fairy like creature that lives in a forest.
A whole picture.
A binary code.
What is + ?
What is a - ?
Multiplication
What is a * ?
What is a / ?
The "stroke" command means
color inside shape
color outside shape
color of blocks
border
What does the "fill" command do
put letters in the shape
put pictures in the shape
put color in the shape
put code in the shape
draw = function(){
......
}
This saves a value, which can be then assigned when writing code
Parameter
Function
Variable
Which of these is correct camel case set up?
Camel Case
CAMELCASE
camel Case
camelCase
___ is a placeholder for a piece of information that can change
Value
Label
Variable
Sprite
___ is known as an assignment operator.
=
;
x=5;
x begets 5
Select the example of only creating (declaring) a variable.
ellipse(200,200,size, size);
size=100;
var size=100;
var size;
Select the example of only assigning a value to variable.
ellipse(200,200,size, size);
size=100;
var size=100;
var size;
Select the example of initializing a variable, which does two things in one command.
ellipse(200,200,size, size);
size=100;
var size=100;
var size;
Select the example of using a variable.
ellipse(200,200,size, size);
size=100;
var size=100;
var size;
The vertical position of the center of the sprite.
sprite.x
sprite.y
sprite.rotation
sprite.scale
The horizontal position of the center of the sprite.
sprite.x
sprite.y
sprite.rotation
sprite.scale
Clockwise spinning or turning in degrees of the sprite
sprite.x
sprite.y
sprite.rotation
sprite.scale
Shrink or grow a sprite keeping the height to width ratio the same.
sprite.x
sprite.y
sprite.rotation
sprite.scale
spritelabel.spriteproperty
This structure is called dot notation.
This structure is called camel case.
This structure is called javascript.
This structure is called a tag.
Select ALL that break camel case rules used in javascript.
1camelCase
camelCase
camel-Case
camel Case
CamelCase
_____are attributes that describe an object's characteristics
Properties
Sprites
Parameters
Animations
_____ is a graphic character on the screen with properties that describe its location, movement, and look.
A property
A sprite
A parameter
An animation
_____ sets an image for the sprite instead of the default gray square appearing.
sprite.tint
sprite.rotation
sprite.setAnimation
sprite.w
_____ can be changed to stretch or distort the image instead of staying in aspect ratio proportion.
sprite.tint
sprite.rotation
sprite.setAnimation
sprite.w
How are sprites similar to variables?
both store information to use throughout the program
both have particular properties that can be used in certain ways
both are graphic characters on the screen
How are sprites DIFFERENT from variables?
CHOOSE 2 ANSWERS
both store information to use throughout the program
sprites have particular properties that can be used in certain ways
both can keep track of numbers
variables can be anything
What is the solution to the following code? (the current value of x the console log will display)
50
60
70
Error
This program has some errors in variable names. Select the correct option for line 6:
ellipse(dimension1, yLocation, size of circle, size of circle);
ellipse(dimension, yLocation, sizeofcircle, sizeofcircle);
ellipse(1dimension, YLocation, size of circle, size of circle);
ellipse(dimension, YLocation, sizeofcircle, sizeofcircle) ;
What is the default size of the sprite.scale?
1
10
100
0
Following the commands top to bottom, what are the final outputs of x,y,z?
20,30,10
10,20,30
0,30,20
20,30,0
It is safe to tell people about your hobbies online (eg it is safe to tell people that you like playing Minecraft)
If you post something mean about someone, you can just delete it and everything will be OK
Private information can be copied and sent to anyone.
Anything you do online leaves a permanent record.
When content that reflects you in a negative light is easily visible in search your online reputation is at risk.
True
False
When you become an adult, you get a new digital footprint, and the one you had when you were a teenager is erased.
Clearing your browsing history removes your digital footprint
Digital footprints can be which of the following?
good
bad
both
Which is the proper way to write an h1 tag
<h1>Hello</h1>
<h1>"Hello
{h1}Hello{/h1}
<h1>Hello<h1>
What should a HTML web page start with?
<b>
<li>
<html>
<start>
Does <ul> tag go on the HTML page or the CSS page?
HTML
CSS
Does the following code go on the HTML page or the CSS page?
body {
background: brown;
}
HTML
CSS
sets the element to one side of the page
margin
width
float
height
sets the color of words in a paragraph
h1 {
color: pink;
}
img {
color: pink;
}
body {
color: pink;
}
p {
color: pink;
}
Set the color of the border
border-style
border-width
border-color
width
TRUE OR FALSE: CSS is used to style web pages
True
False
TRUE OR FALSE: HTML is used to add content to web pages.
True
False
What symbols go around the properties for each HTML tag?
< >
[ ]
{ }
( )
Which one is the smallest heading?
h1
h2
h4
h6
What color does the code change to when it detects a bug on your page?
Blue
Pink
Orange
Purple
A __________ is a protection for any published work that helps to prevent that work from being used without prior authorization.
Firewall
HTML
Copyright
CSS Declaration
A team of friends is creating a game together. They want to make sure that everyone can understand the code that the others write. Which of the following will make it easier for them to read each other's code? (Choose TWO)
Use the counter pattern to increase the score
Include descriptive comments in the program
Use watchers to keep track of variable and sprite property values
Give variables and functions names that make sense
Declare variables outside of the draw loop, but update them inside the draw loop
Why do programmers like to use functions? (Choose TWO)
They keep the code organized and easy to understand.
They are a good way to store user input to use later in the program.
They make the program run faster.
They are necessary for any program to run.
They let you use the same code in different places in the program without having to rewrite it.
Consider the following program (blocks and text)...What is the apple's x position at the end of this program?
20
90
110
There will be two apples in two different positions.
None, because the program will have an error.
Which of the following is NOT best to decide before beginning to write code for a program?
The general purpose and design of the program.
What kinds of variables and functions you will need to make it work.
How the user will interact with the program.
How many lines of code you want to write.
What types of media, such as pictures or sounds, you will need
A team is making a platform jumper game. The background and platforms are working, but the main character won't appear. What might be the problem?
- They forgot to call `drawSprites` in the draw loop.
- The character sprite is drawn behind the background sprite.
- The character sprite is drawn off the screen.
3 only
1 and 2
1 and 3
2 and 3
1, 2 and 3
Look at the following code. Which line should the following comment go? "Bubble floats up"
Line 5
Line 11
Line 14
Line 17
Line 19
Look at the following code. Which line should the following comment go? "Give the bubble an outline"
Line 5
Line 11
Line 14
Line 17
Line 19
Sets the color used to fill a variety of shapes like arc(), ellipse(), rect(), regularPolygon(), shape().
fill(color),
fill(color)
fill(color);
fill(color):
Draws an ellipse (circle). Centered at the x=200, y=200 and no bigger than width of 100 pixels and height of 100 pixels.
ellipse(200, 200, 100, 100);
ellipse(100, 100, 200, 200);
ellipse(200, 100, 100, 200);
ellipse(100, 200, 200, 100);
Draws text onto the display positioned at x and y
Text("Hello world.", 10, 10);
text("Hello world.", 10, 10)
text("Hello world.", 10, 10),
text("Hello world.", 10, 10);
Where does the screen start (point of origin) when placing objects on the screen.
0, 400
400, 400
0, 0
400, 0
Which of these green ellipses could NOT be created based on the code block.
Run 1
Run 2
Run 3
None of them could be created by the code given.
A variable...
can not have a label with spaces.
is a placeholder for a piece of information that can change.
can not have label that begins with a number.
can store numbers, strings, arrays or objects.
The label 2...
sets the variable my_bunny to be an image called "bunny"
places the variable in the center of the screen
is the sprite as it appears on the screen
tells the computer to draw the sprite that has been created onto the screen.
How will this draw loop animate the alien?
Move up and down 200 times
Move diagonally forever
Move left to right forever
Nothing
What is the ending state for each variable after step 4?
xPosition = 100, yPosition = 100
xPosition = 130, yPosition = 100
xPosition = 130, yPosition = 150
xPosition = 130, yPosition = 50
Which is the correct counter pattern for this animation?
sprite.x = 1
sprite.y = -1
sprite.rotation = sprite.rotation - 1;
sprite.scale = sprite.scale + 0.1;
width = width + 1;
height = height - 1;
ellipse(200, 200, width, height);
In programming, a Boolean expression is...
an expression that evaluates to True or False.
an expression with hundreds of options.
an expression that evaluates to True, False, or Maybe
This flowchart is an example of...
abstraction
a function
an If/conditional Statement
an algorithm
Which two will create the same animation?
Which of the following animations was created by this code?
???.velocityX = 1;
function draw() {
background("black");
???.velocityX = ???.velocityX + 1;
drawSprites();
}
What color will be displayed by the following code?
rgb(255,0,0)
blue
green
yellow
red
What color will be displayed by the following code?
rgb(0,0,0)
blue
green
black
red
What color will be displayed by the following code?
rgb(0,0,255)
blue
green
black
red
What color will be displayed by the following code?
rgb(255,255,255)
black
blue
red
white
What color will be displayed by the following code?
rgb(0,255,0)
blue
green
black
red
