
p5Play Project Golf & Helicopter Midterm Review w/ Annotations
Flashcard
•
Computers
•
10th Grade
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Student preview

37 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What does the following code achieve in the game loop?
obstacle.move(-SPEED, 0);
Back
Moves the obstacle horizontally from right to left.
Answer explanation
The code 'obstacle.move(-SPEED, 0);' moves the obstacle horizontally by a negative value of SPEED, which translates to moving it from right to left on the screen. Thus, the correct answer is that it moves the obstacle horizontally from right to left.
2.
FLASHCARD QUESTION
Front
Which condition ensures that the obstacle resets to the right side of the screen after hitting the left side?
Back
3.
FLASHCARD QUESTION
Front
What does the clicking Boolean variable do in this project?
Back
It determines whether the helicopter should move upward or downward.
Answer explanation
The clicking Boolean variable is crucial as it determines the helicopter's movement direction. When true, it allows the helicopter to move upward, while false would typically mean it moves downward.
4.
FLASHCARD QUESTION
Front
How does the value of dy change as the game loop runs?
Back
dy increases or decreases each time through the game loop based on conditions.
Answer explanation
The correct choice is that dy increases or decreases each time through the game loop based on conditions. This means dy is dynamic and can change depending on the game's state, rather than being constant or reset.
5.
FLASHCARD QUESTION
Front
What is the purpose of the MAX_DY constant in the game?
Back
It ensures the helicopter’s vertical speed does not exceed a certain limit.
Answer explanation
The MAX_DY constant is crucial as it limits the helicopter's vertical speed, preventing it from moving too fast and ensuring smoother gameplay. This helps maintain control and enhances the player's experience.
6.
FLASHCARD QUESTION
Front
Which condition ensures the helicopter stays within the screen boundaries?
Back
7.
FLASHCARD QUESTION
Front
How is the “You Lose” message displayed when the helicopter hits the top or bottom of the screen?
Back
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?