Animation and Games JavaScript

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Thomas Martinez
FREE Resource
24 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What does this program do?
Animates a ball by moving it down and to the right once every 20 milliseconds.
Animates a ball by moving it up and to the right once every 20 milliseconds
Animates a ball by moving it down and to the right every 20 seconds
Animates a ball by moving it up and to the right once every 20 seconds
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following statements are true about ball?
I – ball is a local variable
II – the ball variable in draw is different from the ball variable in start
III – ball is a global variable
IV – ball’s scope includes both start and draw
III and IV
I and II
III only
I, II, III, and IV
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The following program animates a ball by setting a timer to move the ball across the screen. We want the animation to stop whenever the user clicks the mouse:
Which statement would stop the animation in this program?
stopTimer(ball.move(2, 2));
stopTimer(draw);
stopTimer(draw());
stopTimer(draw, 20);
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
We extend our draw function to include:
How many times will the ball be moved before the animation stops?
20
40
2
25
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following are techniques that make our code more reusable?
I – Using constants instead of magic numbers
II – Using specific values in our functions rather than using parameters
III – Writing multiple functions that solve small subproblems rather than one function that solves the entire problem.
IV – Writing as few lines of code as possible
I, II, and III
II and IV
I and III, and IV
I, II, III, and IV
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which function has better reusability?
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
How many circles of radius 10 will fit vertically stacked in a window that has height 100? The circles should not overlap, the bottom of one circle should touch the top of the next circle.
10
20
5
100
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Python Quiz (part 1)

Quiz
•
9th - 12th Grade
19 questions
OCR GCSE Computer Science Subroutines

Quiz
•
12th Grade
20 questions
Chapter 2: Input and Output Devices

Quiz
•
9th - 11th Grade
21 questions
AP CSP Unit 5 Ch 1 Quiz

Quiz
•
9th - 12th Grade
20 questions
JavaScript Quiz

Quiz
•
11th Grade
20 questions
Understanding Computer Hardware

Quiz
•
8th Grade - University
20 questions
Basic JavaScript Review

Quiz
•
9th - 12th Grade
20 questions
Review JavaScript

Quiz
•
11th Grade - University
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade