CodeHS Unit 9 Test - Animations and Games
Quiz
•
Computers
•
8th - 10th Grade
•
Hard
Teri Miles
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the following code, when will the function draw be called?
Once, inside of start
Never
Every 20 milliseconds
Every 20 seconds
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does this program do?
Draws 1 randomly sized circle at a random place on the canvas.
Draws several randomly sized circles at random places on the canvas by drawing 1 every 50 milliseconds.
Draws 1 randomly colored circle at the center of the canvas.
Draws several randomly colored circles at the center of the canvas by drawing 1 every 50 milliseconds.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why do we want our code to be “reusable”?
To avoid writing similar code multiple times
To avoid solving the same problem over and over again
To save time
All of these are correct.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can we make our code reusable?
Use constants instead of magic numbers
Use parameters in our functions instead of specific values
Write multiple functions that solve small subproblems rather than one function that solves the entire problem.
All of these are correct.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function has better reusability?
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
This is a Circle object on our canvas named ball. Point A is on the far left edge of the circle. How can we calculate the x-coordinate of point A?
ball.getX() - ball.getRadius();
ball.getY() + ball.getRadius();
ball.getX() + ball.getRadius();
ball.getX();
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose we’ve written a function drawCircle that we want to call every time the mouse is clicked. How can we do this?
mouseClickMethod(drawCircle(e));
if(mouseClickMethod){
drawCircle();
}
mouseClickMethod(drawCircle);
mouseClickMethod(drawCircle());
Create a free account and access millions of resources
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?
Similar Resources on Wayground
15 questions
Lua Review Corona SDK with Notepad++
Quiz
•
10th - 12th Grade
20 questions
New Scratch
Quiz
•
6th - 8th Grade
15 questions
HTML
Quiz
•
8th - 12th Grade
15 questions
Tin học 10-Bài 3
Quiz
•
1st - 10th Grade
15 questions
History of Computers
Quiz
•
6th - 12th Grade
20 questions
Python Recap
Quiz
•
7th Grade - University
20 questions
CPA Revision MCQ1
Quiz
•
8th - 9th Grade
15 questions
Networking Quiz
Quiz
•
8th - 9th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
