NEW
Font size
S
M
L
XL
WorksheetsCS Discoveries Unit 3
Total questions: 21
Worksheet time: 20mins
Name
Class
Date
1.
Which of the following is the correct syntax to create a ellipse in Javascript?
a)
ellipse(100, 100);
b)
circle(100, 100);
c)
ell(100, 100);
d)
circle<100, 100>
2.
Which of the following is the correct syntax to fill a shape with color in Javascript?
a)
fill("red");
b)
color: red;
c)
colorFill(red);
d)
myColor: red;
3.
Which of the following creates a rectangle with the X-Coordinate at 60?
a)
rect(60, 100);
b)
rect(100, 60);
c)
ellipse(60, 100)
d)
circle (100, 60)
4.
Which of the following creates an ellipse with the Y-Coordinate at 100?
a)
ellipse(60, 100);
b)
ell(100, 60);
c)
rect(60, 100)
d)
square (100, 60)
5.
Which of the following rectangles has a width of 50 and height 100?
a)
ellipse(100, 100, 100, 50);
b)
rectangle(100, 50);
c)
rect(100, 100, 50, 100);
d)
ellipse(50, 100);
6.
Which of the following ellipses has a width of 250 and height 100?
a)
ellipse(100, 100, 250, 100);
b)
circle(250, 50);
c)
rect(100, 100, 250, 100);
d)
ellipse(50, 100);
7.
Which of the following is the correct syntax to fill a background with color in Javascript?
a)
background("red");
b)
background-color: red;
c)
backgroundFill(red);
d)
myColor: red;
8.
Which of the following Random Number functions would return a value between 1 and 10?
a)
randomNumber(10);
b)
randomNumber(1, 10);
c)
randomNumber(1-10);
d)
random(10);
9.
Which of the following values can be returned by the code: randomNumber (0, 10)?
a)
-1
b)
3
c)
11
d)
10.5
10.
How many parameters does the following line of code have: rect(100, 100);
a)
1
b)
2
c)
3
d)
4
11.
Which of the following is an example of a sprite's rotation property?
a)
sprite.x
b)
sprite.rotation
c)
rotateSprite()
d)
sprite.around
12.
What is the default frame rate of the draw function?
a)
1
b)
30
c)
60
d)
120
13.
Which of the following is an example of a boolean value?
a)
true
b)
2
c)
"hello"
d)
"red"
14.
(5 > 3)
a)
True
b)
False
15.
(5 < = 5)
a)
True
b)
False
16.
(5 == 3)
a)
True
b)
False
17.
What does the sprite animation look like?
a)
Move your sprite to the left
b)
Rotate your sprite clock wise
c)
Move your sprite to the right
d)
Make your sprite grow
18.
What does the sprite animation look like?
a)
Move your sprite up
b)
Rotate your sprite clock wise
c)
Move your sprite to the right
d)
Move your sprite down
19.
What does the sprite animation look like?
a)
Move your sprite up
b)
Rotate your sprite clock wise
c)
Make your sprite grow
d)
Move your sprite down
20.
Which of the following is the correct syntax to create a rectangle in Javascript?
a)
rectangle(100, 100)
b)
rect(100, 100);
c)
square(100, 100);
d)
rect<100, 100>
21.
What happens if the raceCar.x property is greater than 400?
a)
It starts moving backwards
b)
It moves to the X Coordinate 400
c)
It rotates 400 degrees
d)
It becomes invisible
Reset
