1/58
Vocabulary practice flashcards covering fundamental Python concepts across all eight lectures: computer architecture basics, variables, expressions, conditional execution, loops, functions, lists, tuples, sets, dictionaries, file I/O, and exception handling.
Computer
A machine that stores data, interacts with peripheral devices, and executes programs.
Hardware
The physical computer and all of its connected peripheral devices collectively.
Software
The programs and sequences of instructions that a computer executes.
Central Processing Unit (CPU)
The component of a computer that performs program control and data processing by locating and executing instructions.
Primary Storage
Electronic circuits made from memory chips that store data provided that they are supplied with electric power.
Secondary Storage
Slower and less expensive storage, such as a hard disk, that persists data without electricity.
Compile-time Error
A violation of the programming language syntax and rules that is detected when the code is translated into executable form; also known as a syntax error.
Run-time Error
An error that occurs when a program successfully compiles and runs but produces unexpected results or crashes during execution.
Algorithm
A sequence of discrete, unambiguous steps selected to produce a desired output or result from given inputs.
Pseudocode
A representation of an algorithm using structured natural language phrases rather than strict programming language syntax.
Variable
A named storage location in a computer program that holds a value.
Primitive Data Type
A fundamental data type provided directly by the programming language itself, such as numbers and strings.
Compound Data Type
A data type that can hold multiple items or elements, potentially of different types, as a single entity (such as lists, tuples, sets, and dictionaries).
Constant
A variable whose value is intended not to be changed after its initial assignment, conventionally named in all capital letters.
Floor Division
An integer division operation denoted by the // operator that computes the quotient and discards the fractional part, returning the largest integer less than or equal to the mathematical result.
Modulus Operator
An arithmetic operator denoted by that calculates the remainder of division, obeying the relationship a%b=a−b×(a//b).
String
A sequence of characters, written inside single or double quotation marks.
String Concatenation
The operation of combining two or more strings together end-to-end to form a single string using the + operator.
Escape Sequence
A sequence of characters beginning with a backslash (such as \n for a newline) that represents a special character rather than literal text.
Prompt
A message printed to the screen that informs the user what input is expected when the program requests data.
Conditional Execution
A fundamental programming construct in which certain instructions are executed only if a specified condition evaluates to true.
Relational Operator
An operator used to compare two values, such as numbers or strings (e.g., ==, !=, <, <=, >, >=).
Lexicographic Ordering
The sequential character-by-character ordering used to compare strings, in which uppercase letters precede lowercase letters and numeric characters precede letters.
Nested Branches
A conditional structure in which an if statement is placed inside the body or branch of another if statement.
Match-Case Statement
A structural pattern matching construct introduced in Python 3.10 that compares a subject value against multiple candidate patterns and executes the action of the first match.
Boolean Variable
A variable of type bool that can hold exactly one of two logical values: True or False.
De Morgan's Laws
Logical equivalence rules stating that not (A and B) is identical to not A or not B, and not (A or B) is identical to not A and not B.
Input Validation
The process of verifying that user-supplied values satisfy required program criteria and boundaries before using them in computations.
Loop
A control structure that repeats a block of instructions until a specific condition is no longer met or a collection of items is fully processed.
Hand-Tracing
A manual simulation of code execution where a programmer records and steps through variable values on paper to verify correctness or find errors.
Sentinel Value
A designated input value that signals the end of a sequence of data without being considered part of the processed dataset.
Infinite Loop
A loop whose terminating condition never evaluates to false, causing its body to execute repeatedly without ending on its own.
Break Statement
A statement that immediately halts execution of the innermost loop and skips all remaining statements in that loop body.
Continue Statement
A statement that ends the current iteration of a loop prematurely and jumps directly to the evaluation of the next iteration.
Nested Loops
A programming arrangement where one loop is placed entirely inside the body of another loop, commonly used for processing multi-dimensional data or tables.
Simulation
A computational model that uses a program and pseudo-random numbers to mimic real-world activities or theoretical behaviors over time.
Function
A named sequence of instructions that packages a computation into an understandable, self-contained, and reusable block.
Parameter Variables
Variables specified in a function header that are initialized with the corresponding arguments passed to the function when called; also called formal parameters.
Arguments
The actual values or expressions supplied to a function inside the parentheses of a function call; also called actual parameters.
Return Statement
A statement that terminates the execution of a function call and specifies the result passed back to the caller.
Scope of a Variable
The region of a program in which a particular variable is defined, visible, and accessible.
Global Variable
A variable defined outside of all functions that is accessible throughout the program and requires a global declaration to be modified inside a function.
List
A mutable container that stores an ordered collection of elements accessible by integer index positions.
Mutable
A property of a data structure that allows its contents or individual elements to be modified, added, or removed after creation.
List Reference
A value that specifies the memory location of a list; copying a list reference produces another pointer to the same list rather than an independent duplicate.
Linear Search
An algorithm that inspects elements sequentially from the start of a container to the end until a target match is found.
Tuple
An immutable sequence of arbitrary data elements created as a comma-separated sequence, usually enclosed in parentheses.
Set
An unordered, mutable container that stores a collection of unique values without duplicate elements.
Subset
A set relation where every element present in the first set is also a member of the second set.
Set Union
An operation on two sets that returns a new set containing all unique elements belonging to either or both original sets.
Set Intersection
An operation on two sets that returns a new set containing only the elements that are common to both sets.
Set Difference
An operation that returns a new set containing the elements that belong to the first set but do not appear in the second set.
Dictionary
A mutable container (or map) that stores key-value pairs where each unique key maps to an associated value.
File Object
An object returned by the open() function that provides the programmatic interface and methods to read from or write to a file.
With Statement
A compound statement used when opening files that guarantees the file is properly closed automatically when the execution block finishes.
Exception
A signal or error condition raised during program execution that alters the normal flow of control unless caught and handled.
Try Block
A block of code wrapped with the try keyword that is monitored for runtime exceptions during execution.
Except Block
A block of code associated with a try statement that specifies how to handle a particular type of raised exception.
Finally Block
A clause in exception handling containing clean-up instructions that always execute, regardless of whether an exception occurred or was handled.