1/20
Vocabulary practice flashcards covering fundamental Python concepts including mutability, references, list comprehensions, recursion, string methods, file processing, and basic Pygame commands.
Equality Operator (==)
An operator that compares values to check whether two operands have equivalent values.
Identity Operator (is)
An operator that compares whether two variables reference the exact same object in memory.
Mutable Objects
Data types—such as lists and dictionaries—whose contents can be modified in place without changing their identity.
append()
A list method that modifies the existing list by adding an element to the end, rather than creating a new list.
An operation that combines two lists together by creating an entirely new list.
List Comprehension
A concise syntactic construct for creating a new list from an existing collection, structured as [new_expression for item in collection].
Recursion
A programming approach where the definition of a concept or process depends on a simpler or previous version of itself.
Base Case
The terminating condition in a recursive function that stops recursion without calling itself.
Recursive Case
The branch of a recursive function that calls itself with a smaller subproblem, making progress toward the base case.
Factorial
The product of an integer and all positive integers beneath it, calculated recursively as n!=n×(n−1)! with a base case of 0!=1.
Fibonacci Sequence
A sequence of numbers (1, 1, 2, 3, 5, 8, 13…) where each number is the sum of the previous two numbers.
Driver Function
A function that handles one-time setup and data preparation before delegating the core computation to a recursive function.
Immutable Objects
Data types—such as strings—whose values cannot be altered once created, preventing functions from modifying them in place.
Refactoring
The practice of updating and restructuring existing code to improve code quality without altering its functionality.
Call Stack
The memory region where parameters and local variables are allocated as stack frames each time a function is called.
Accumulator Loop
A programming pattern that iterates over a collection to update an accumulating variable (such as a running total or an appended list).
strip()
A string method commonly used in file processing to remove leading and trailing whitespace characters from a line.
split()
A string method that divides a string into a list of substrings separated by a given delimiter.
join()
A string method that concatenates elements of a list of words into a single string using a specified separator.
pygame.init()
The initialization method used at the start of a Pygame script to initialize all imported Pygame modules.
blit()
A Pygame method (e.g., screen.blit) used to draw or insert an image surface onto another surface at a specified position.