1/18
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What is a variable in programming?
An abstraction inside a program that can hold a value.
How is an index used in relation to lists or strings?
It is a method for referencing the elements using natural numbers.
What is an element in a list?
An individual value in a list that is assigned a unique index.
What does a group represent in programming?
A collection of shapes treated as a single shape.
How do you move every shape in a group to the right by 5?
Use g.centerX += 5.
What properties can be used with groups?
centerX, centerY, right, left, top, bottom, fill, opacity, visible, and rotateAngle.
What is the purpose of group.children?
It is a list of every shape in the group.
How can you access properties of each individual shape in a group?
Loop through group.children using for shape in group.children:.
When is a shape removed from a group?
If the shape is made invisible.
What are global variables?
Variables defined outside of functions and can be used anywhere below the line where defined.
When should you use local variables?
Only within the function in which they are defined.
What is a helpful type of local variable?
Helper variables that make code easier to read.
How can you store multiple values in programming?
Using a list, like colorList = ['red', 'green'].
How do you access elements in a list?
By indexing into the list, which starts at 0.
What happens if you try to access an out of bounds index in a list?
You will receive an out of bounds error.
What operator do you use to avoid out of bounds errors when cycling through lists?
The mod operator (%) to return indices within the bounds of the list.
What does the colorList.append() method do?
It adds an element to the end of the list.
What does the colorList.insert() method do?
It inserts an element at a specified index in the list.
How does the colorList.remove() method work on the AP Exam?
It behaves like colorList.pop() which removes an element at a specified index.