1/39
Comprehensive vocabulary flashcards covering Python programming concepts including functions, data types, control flow, file I/O, and syntax rules.
Abstraction hides detail and allows a person to view many things as just one thing.
TRUE
Functions as Abstraction Mechanisms
A mechanism by which functions hide lower-level procedural details, primarily through the elimination of redundant or repetitious code.
Function Arguments
The inputs to a function that provide the means for systematically varying the problem instances its algorithm solves by allowing the caller to supply context-specific data.
Top-Down Design
A design methodology where a problem is decomposed into smaller problems, which are gradually solved to produce an overall solution.
Namespace
The set of a program's variables and their current values.
Module-Level Variable Assignment in Functions
The behavior where Python creates a temporary local variable of the same name whose scope exists only within the function when an attempt is made to assign or change a module-level variable without explicit global declaration.
Default Arguments
Optional function parameters assigned default values in the function header using the syntax <key>=<value>; they simplify design, make functions more general, and must be listed after required arguments.
Scope of a Parameter Variable
The entire body of the function in which the parameter is introduced, remaining invisible outside of that function.
Equality Operator (==)
An operator that compares the values or contents of two objects and returns True if they hold the same contents, even if they are not aliases for the same object in memory.
List Index
A unique positive integer specifying the exact position of an item in a list, ranging from 0 to the list length minus 1.
Mutator
A method devoted entirely to the modification of the internal state of an object.
range(upper)
A function that, when passed a single numeric argument upper, generates a sequence of integers from 0 through upperโ1 (for example, range(50) generates integers 0 through 49).
main Function
A standard architectural function in Python scripts that usually expects no arguments and returns no value.
Tuple
An immutable sequence data structure whose contents cannot be altered after creation, recommended whenever a list's structure will not need to change.
Return Value of sort()
The special value None, returned automatically because sort() is an in-place mutator method.
Default Function Return Value
The special value None, automatically returned by any Python function whose definition does not include a return statement.
Docstring
A documentation string literal that is indented and placed on the line immediately following the def header of a function.
help() Function
A Python shell command used to view documentation that displays the docstring of a function when passed the function's name (e.g., help(calculate)).
Dictionary
A lookup table data structure enclosed in curly braces {} that maps unique keys to values using the format key: value separated by commas.
String
A sequence of zero or more characters.
Index Out of Range Error
An error raised when attempting to access an element of a sequence using an index equal to or greater than the sequence's length.
FTPS
A network protocol that utilizes encryption for secure data transfer.
Base 10 Numbering System
The decimal number system, which utilizes 10 digits from 0 through 9.
Hexadecimal Number System
The base-16 numbering system, which represents digit values greater than 910โ using letters.
Python Object Model
The design principle in Python stating that all data values are objects.
isalpha()
A string method that returns True if the string contains only alphabetic letters, and False otherwise.
lower()
A string method that returns a copy of the target string with all characters converted to lowercase.
File Mode 'r'
A mode string used in Python's open() function that specifies opening a file for read access.
readline()
A file access method that reads a single line of input from a file and returns it as a string, including the newline character.
os.getcwd()
A function in the os module that returns the directory path of the current working directory.
Count-Controlled Loop
A loop structure that counts through a specified range of numbers.
%d Format Specifier
A string formatting specifier in Python indicating that the associated variable is formatted as an integer.
Selection Statement
A control structure, such as the if-else statement, that allows a computer to make choices and selectively execute code based on test conditions.
%f Format Specifier
A string formatting specifier written in the form <field width>.<precision>f used to format floating-point numbers to a designated precision.
Boolean / Logical Operators in Python
The built-in logical keywords in Python: and, or, and not (excluding xor).
Sentinel Value
A special input value provided by the user to terminate a conditional iteration loop, such as a while loop.
Entry-Control Loop
An alternate term for a while loop, so named because its continuation condition is evaluated at the top before the loop body executes.
Python Variable Naming Rules
Syntax rules stating that variable names can begin with a letter or underscore and contain any number of letters, digits, or underscores, but cannot begin with a digit.
Modulus Operator (%)
An arithmetic operator that returns the remainder of the division of two numbers (such as returning 2 for the expression 6ย %ย 4).
int() Float Conversion
A conversion process in Python where the int() function converts a float to an integer by truncating or removing its fractional portion.