Which of the following statements are true about the code in the image: I. ball is a local variable II. the ball variable in draw is different from the ball variable in main III. ball is a global variable IV. ball’s scope includes both main and draw

Unit 9 Animation and Games in Javascript (CodeHS)

Flashcard
•
Computers
•
10th Grade
•
Hard
Quizizz Content
FREE Resource
Student preview

24 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Back
III. and IV.
2.
FLASHCARD QUESTION
Front
The following program animates a ball using a timer. We want the animation to stop when the user clicks the mouse. Which statement would stop the animation in this program?
Back
3.
FLASHCARD QUESTION
Front
What goes in the blank?
Back
4.
FLASHCARD QUESTION
Front
Which of the following Does Not make code more reusable?
- Using const variables instead of hard-coded values
- Using specific values in functions instead of using parameters
- Writing multiple functions that solve small subproblems rather than one function which solves the entire problem
- Using parameters to generalize functions
Back
Using specific values in functions instead of using parameters
5.
FLASHCARD QUESTION
Front
Which function is more reusable?
Back
6.
FLASHCARD QUESTION
Front
Imagine you are filling a 100 by 100 canvas with circles. They are touching but not overlapping at four points. Their radius is 10. How many circles will fit on the canvas?
Back
25
7.
FLASHCARD QUESTION
Front
What statement would you use to determine if ball is hitting the right edge of the window?
Back
Create a free account and access millions of resources
Similar Resources on Wayground
16 questions
CodeHS Unit 1

Flashcard
•
9th - 12th Grade
15 questions
Beginning ESOL Questions

Flashcard
•
KG
18 questions
Animation and Games Review

Flashcard
•
9th - 12th Grade
20 questions
Codeing with Karel Review

Flashcard
•
9th - 10th Grade
23 questions
Karel commands

Flashcard
•
10th Grade
21 questions
AP CSP Unit 7 Review

Flashcard
•
11th Grade
15 questions
Biology 1A Semester 1 Final

Flashcard
•
10th Grade
15 questions
Emma

Flashcard
•
KG
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade