
Understanding Event Functions and onStep in Python
Flashcard
•
Computers
•
9th Grade
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Student preview

8 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What is the purpose of the onStep function?
Back
To execute code once per second as defined by app.stepsPerSecond.
2.
FLASHCARD QUESTION
Front
How many times does onStep run if app.stepsPerSecond is set to 1? Options: Once per minute, Once per second, Twice per second, Ten times per second
Back
Once per second
3.
FLASHCARD QUESTION
Front
What data is accessible locally inside the function's implementation of def onMouseRelease(mouseX, mouseY):?
Back
mouseX, mouseY
4.
FLASHCARD QUESTION
Front
In python, which method is called to add data to the end of a list?
Back
append
5.
FLASHCARD QUESTION
Front
What is the meaning of the term mutability in computer programming?
Back
Mutability is the ability of an object to be changed after its creation.
6.
FLASHCARD QUESTION
Front
In your CMU CS Academy App, you have declared a python list named app.shapes. Each time the onStep function triggers, you want to traverse the entire list of shapes. What code would you write to make this happen? Options: while shape in app.shapes:, for shape in app.shapes: # perform actions with shape, foreach shape in app.shapes:, for shape in app.shapes()
Back
for shape in app.shapes:
# perform actions with shape
7.
FLASHCARD QUESTION
Front
what does it mean to traverse a data structure such as a python list?
Back
To traverse a Python list means to access each element in the list sequentially.
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?
Similar Resources on Wayground
4 questions
Z Transform of a Signal
Flashcard
•
KG
8 questions
Accounting Concepts
Flashcard
•
11th Grade
8 questions
MATHEMATICS 10 - Graph of Polynomial Functions PART 1
Flashcard
•
10th Grade
10 questions
year 6 unit 8 vocabulary
Flashcard
•
8th Grade
10 questions
Kebarangkalian
Flashcard
•
10th Grade
6 questions
Sci 9 Biological Diveristy Topic 4
Flashcard
•
9th Grade
3 questions
Basic Conversation Questions
Flashcard
•
KG
3 questions
Untitled Flashcards
Flashcard
•
KG
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade