Fianl Flashcards
What adds element to the end of the list?
append()
What is a python file extension called?
*It also indicates that it is a python program/module…
.py
What is the assignment operator?
a single equal sign
What are the boolean values?
True or False
True and False are capitalized
When you use multiple nested if statements, the path that the program follows is known as…?
Branching
Cartesian coordinate system
x and y axes coordinates (graphs use them)
X increases as you go right Y increases as you go down
The description or blueprint of an object is?
Class
Knowing when two sprites are touching or overlapping is?
Collision detection
Commenting
Use a # to create a single-line comment
Gets ignored by the interpreter
A triple quoted string can be used (“““hey”””) for multiple lines
Comparison operators
==, , =, !=
be able to name 3 of the 6 - (> goes before =)
What does an event-driven program do?
It waits for instructions
What is something that stores data; you can read or write?
A file
What type of loop is used to loop over a list of values?
for loop
How do you pass an argument to a function?
you call the function and put the argument in the parentheses
function creation
You create or define a function with Python’s def
How is a global variable defined?
they are defined outside of functions
What does GUI stand for?
Graphical User Interface.
What is not not able to be changed (like a tuple)
Immutable
What does import do?
imports a python module
An indentation must be…
4 spaces.
What does int() do?
can convert a string to an integer
don’t leave off ()
Each time a loop is called a…
Iteration
a pygame event that senses when you release any key is a…?
KEYUP
To create a list you use _______ brackets.
Square
Example: name = []