p5Play Project Golf & Helicopter Midterm Review w/ Annotations

Flashcard
•
Computers
•
10th Grade
•
Hard
Quizizz 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
Create a free account and access millions of resources
Similar Resources on Wayground
30 questions
Python Basics: Variables and Syntax

Flashcard
•
10th Grade
33 questions
scratch final revision

Flashcard
•
8th Grade
32 questions
Scratch Jr. Flashcard

Flashcard
•
KG
30 questions
2024-2025 Fundamentals of Computing Final Exam Study Guide

Flashcard
•
9th - 12th Grade
30 questions
2024-2025 Fundamentals of Computing Final

Flashcard
•
9th - 12th Grade
27 questions
Python GCSE

Flashcard
•
10th Grade
32 questions
Unit 3 FINAL Flashcard - APCSP

Flashcard
•
10th Grade
34 questions
English 2 Vocab. 7 and 8

Flashcard
•
10th Grade
Popular Resources on Wayground
15 questions
Hersheys' Travels Quiz (AM)

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

Quiz
•
6th - 8th Grade
30 questions
Lufkin Road Middle School Student Handbook & Policies Assessment

Quiz
•
7th Grade
20 questions
Multiplication Facts

Quiz
•
3rd Grade
17 questions
MIXED Factoring Review

Quiz
•
KG - University
10 questions
Laws of Exponents

Quiz
•
9th Grade
10 questions
Characterization

Quiz
•
3rd - 7th Grade
10 questions
Multiply Fractions

Quiz
•
6th Grade