
Java Script BASICS
Authored by Mrs.K. González
Computers
9th - 12th Grade
Used 193+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
27 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The command: ellipse( 200,100, 20, 20) will draw:
an ellipse that is 100 pixels wide and 100 pixels high
a circle whose center is 200 pixels across and 100 pixels down
a rectangle that is 200 pixels by 100 pixels wide
a circle that is 200 pixels in diameter
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
After running the following code, what will be the value of x?
y = 3;
x = 5 * y;
3
5
15
0
3.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
A variable is used to:
Store a value in memory
Draw a circle
Store a value that does not change
Draw a rectangle
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following code section will:
x = 0;
draw = function() {
rectangle(x, 50, 50, 25);
x++;
}
Draw lots of ellipses across the screen
Draw lots of rectangles across the screen
Draw a rectangle
Draw an ellipse
5.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Any code that is within the following draw function:
draw = function(){
......
}
Will be performed twice
Will not be performed
Will be performed once
Will be repeated over and over again
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following code will:
x++;
Add 1 to the previous value of x
Add 1 to the previous value of y
Subtract 1 from the previous value of x
Give an error message
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following code will:
var xPos = 15;
var yPos = 350;
var xwidth = 50;
var ywidth = 50;
draw = function() {
background(29, 40, 115);
fill(255, 242, 0);
ellipse(xPos, yPos, xwidth, ywidth); xPos++;
yPos--;
xwidth = xwidth* 99/100;
ywidth = ywidth * 99/100;
};
Draw a circle that moves right to left accross the screen, getting smaller
Draw a circle that moves diagonally accross the screen, getting bigger
Draw a circle that moves diagonally accross the screen, getting smaller
Draw a circle that moves right to left accross the screen, getting bigger
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?