|
|
Created by Lilith Rayne-Martin
about 7 years ago
|
|
| Question | Answer |
| The process of formulating a problem, finding a solution, and expressing it. | problem solving |
| A programming language like Python that is designed to be easy for humans to read and write. | high-level language |
| A programming language that is designed to be easy for a computer to run; also called “machine language” or “assembly language” | low-level language |
| portability | A property of a program that can run on more than one kind of computer. |
| interpreter | A program that reads another program and executes it |
| Characters displayed by the interpreter to indicate that it is ready to take input from the user. | prompt |
| program | A set of instructions that specifies a computation. |
| An instruction that causes the Python interpreter to display a value on the screen. | print statement: |
| A special symbol that represents a simple computation like addition, multiplication, or string concatenation. | operator |
| One of the basic units of data, like a number or string, that a program manipulates. | value |
| A category of values. The types we have seen so far are integers (type int), floatingpoint numbers (type float), and strings (type str). | type |
| A type that represents whole numbers. | integer |
| A type that represents numbers with fractional parts. | floating-point: |
| A type that represents sequences of characters. | string |
| Any one of the languages that people speak that evolved naturally. | natural language: |
| Any one of the languages that people have designed for specific purposes, such as representing mathematical ideas or computer programs; all programming languages are formal languages. | formal language: |
| One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language. | token |
| The rules that govern the structure of a program. | syntax |
| To examine a program and analyze the syntactic structure. | parse |
| An error in a program. | bug |
| The process of finding and correcting bugs. | debugging |
| A name that refers to a value. | variable |
| A statement that assigns a value to a variable. | assignment: |
| A graphical representation of a set of variables and the values they refer to. | state diagram: |
| A reserved word that is used to parse a program; you cannot use keywords like if, def, and while as variable names. | keyword |
| One of the values on which an operator operates. | operand |
| A combination of variables, operators, and values that represents a single result. | expression |
| To simplify an expression by performing the operations in order to yield a single value. | evaluate |
| A section of code that represents a command or action. So far, the statements we have seen are assignments and print statements. | statement |
| To run a statement and do what it says. | execute |
| A way of using the Python interpreter by typing code at the prompt. | interactive mode: |
| A way of using the Python interpreter to read code from a script and run it. | script mode: |
| A program stored in a file. | script |
| Rules governing the order in which expressions involving multiple operators and operands are evaluated. | order of operations: |
| To join two operands end-to-end. | concatenate |
| Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program. | comment |
| An error in a program that makes it impossible to parse (and therefore impossible to interpret). | syntax error: |
| An error that is detected while the program is running. | exception |
| The meaning of a program. | semantics |
| An error in a program that makes it do something other than what the programmer intended. | semantic error: |
| A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result. | function |
| A statement that creates a new function, specifying its name, parameters, and the statements it contains. | function definition: |
| A value created by a function definition. The name of the function is a variable that refers to a function object. | function object: |
| The first line of a function definition. | header |
| The sequence of statements inside a function definition. | body |
| A name used inside a function to refer to the value passed as an argument. | parameter |
| A statement that runs a function. It consists of the function name followed by an argument list in parentheses | function call: |
| A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function. | argument |
| A variable defined inside a function. A local variable can only be used inside its function. | local variable: |
| The result of a function. If a function call is used as an expression, the return value is the value of the expression. | return value: |
| A function that returns a value | fruitful function: |
| A function that always returns None | void function: |
| A special value returned by void functions. | None |
| A file that contains a collection of related functions and other definitions. | module |
| A statement that reads a module file and creates a module object. | import statement: |
| A value created by an import statement that provides access to the values defined in a module | module object: |
| The syntax for calling a function in another module by specifying the module name followed by a dot (period) and the function name | dot notation: |
| Using an expression as part of a larger expression, or a statement as part of a larger statement | composition |
| The order statements run in. | flow of execution: |
| A graphical representation of a stack of functions, their variables, and the values they refer to. | stack diagram: |
| A box in a stack diagram that represents a function call. It contains the local variables and parameters of the function | frame |
| A list of the functions that are executing, printed when an exception occurs. | traceback |
| A function that is associated with an object and called using dot notation. | method |
| A part of a program that can run repeatedly. | loop |
| The process of transforming a sequence of statements into a function definition | encapsulation |
| The process of replacing something unnecessarily specific (like a number) with something appropriately general (like a variable or parameter). | generalization |
| An argument that includes the name of the parameter as a “keyword”. | keyword argument: |
| A description of how to use a function, including the name and descriptions of the arguments and return value | interface |
| The process of modifying a working program to improve function interfaces and other qualities of the code. | refactoring |
| A process for writing programs. | development plan: |
| A string that appears at the top of a function definition to document the function’s interface | docstring |
| A requirement that should be satisfied by the caller before a function starts | precondition |
| A requirement that should be satisfied by the function before it ends. | postcondition |
| An operator, denoted //, that divides two numbers and rounds down (toward negative infinity) to an integer. | floor division: |
| An operator, denoted with a percent sign (%), that works on integers and returns the remainder when one number is divided by another | modulus operator: |
| An expression whose value is either True or False | boolean expression: |
| One of the operators that compares its operands: ==, !=, >, <, >=, and <=. | relational operator: |
| One of the operators that combines boolean expressions: and, or, and not. | logical operator: |
| Astatement that controls the flow of execution depending on some condition | conditional statement: |
| The boolean expression in a conditional statement that determines which branch runs. | condition |
| A statement that consists of a header and a body. The header ends with a colon (:). The body is indented relative to the header. | compound statement: |
| One of the alternative sequences of statements in a conditional statement. | branch |
| A conditional statement with a series of alternative branches | chained conditional: |
| A conditional statement that appears in one of the branches of another conditional statement. | nested conditional: |
| A statement that causes a function to end immediately and return to the caller. | return statement: |
| The process of calling the function that is currently executing. | recursion |
| A conditional branch in a recursive function that does not make a recursive call. | base case: |
| A recursion that doesn’t have a base case, or never reaches it. Eventually, an infinite recursion causes a runtime error. | infinite recursion: |
| A variable used to store an intermediate value in a complex calculation | temporary variable: |
| Part of a program that can never run, often because it appears after a return statement. | dead code: |
| A program development plan intended to avoid debugging by adding and testing only a small amount of code at a time. | incremental development: |
| Code that is used during program development but is not part of the final version. | scaffolding |
| A programming pattern that uses a conditional statement to check for and handle circumstances that might cause an error. | guardian |
| Assigning a new value to a variable that already exists. | reassignment |
| An assignment where the new value of the variable depends on the old. | update |
| An assignment that gives an initial value to a variable that will be updated | initialization |
| An update that increases the value of a variable (often by one). | increment |
| An update that decreases the value of a variable. | decrement |
| Repeated execution of a set of statements using either a recursive function call or a loop. | iteration |
| A loop in which the terminating condition is never satisfied. | infinite loop: |
| A general process for solving a category of problems. | algorithm |
| Something a variable can refer to. For now, you can use “object” and “value” interchangeably | object |
| An ordered collection of values where each value is identified by an integer index | sequence |
| One of the values in a sequence. | item |
| An integer value used to select an item in a sequence, such as a character in a string. In Python indices start from 0. | index |
| A part of a string specified by a range of indices. | slice |
| A string with no characters and length 0, represented by two quotation marks. | empty string: |
| The property of a sequence whose items cannot be changed. | immutable |
| To iterate through the items in a sequence, performing a similar operation on each. | traverse |
| A pattern of traversal that stops when it finds what it is looking for. | search |
| A variable used to count something, usually initialized to zero and then incremented. | counter |
| A statement that calls a method. | invocation |
| A function or method argument that is not required. | optional argument: |
| A value that represents an open file. | file object: |
| A way of solving a problem by expressing it as an instance of a previously solved problem. | reduction to a previously solved problem: |
| A test case that is atypical or non-obvious (and less likely to be handled correctly | special case: |
| A sequence of values. | list |
| One of the values in a list (or other sequence), also called items. | element |
| A list that is an element of another list. | nested list: |
| A variable used in a loop to add up or accumulate a result. | accumulator |
| A statement that updates the value of a variable using an operator like +=. | augmented assignment: |
| A processing pattern that traverses a sequence and accumulates the elements into a single result. | reduce |
| A processing pattern that traverses a sequence and performs an operation on each element. | map |
| A processing pattern that traverses a list and selects the elements that satisfy some criterion. | filter |
| Something a variable can refer to. An object has a type and a value | object |
| Having the same value. | equivalent |
| Being the same object (which implies equivalence). | identical |
| The association between a variable and its value. | reference |
| A circumstance where two or more variables refer to the same object. | aliasing |
| A character or string used to indicate where a string should be split. | delimiter |
| A relationship in which each element of one set corresponds to an element of another set | mapping |
| A mapping from keys to their corresponding values. | dictionary |
| The representation of the mapping from a key to a value | key-value pair: |
| In a dictionary, another name for a key-value pair. | item |
| An object that appears in a dictionary as the first part of a key-value pair. | key |
| An object that appears in a dictionary as the second part of a key-value pair. This is more specific than our previous use of the word “value”. | value |
| A way of performing a computation. | implementation |
| The algorithm used to implement Python dictionaries. | hashtable |
| A function used by a hashtable to compute the location for a key. | hash function: |
| Atype that has a hash function. Immutable types like integers, floats and strings are hashable; mutable types like lists and dictionaries are not | hashable |
| A dictionary operation that takes a key and finds the corresponding value. | lookup |
| A dictionary operation that takes a value and finds one or more keys that map to it. | reverse lookup: |
| A statement that (deliberately) raises an exception. | raise statement: |
| A list (or other sequence) with a single element. | singleton |
| A diagram that shows every frame created during the execution of a program, with an arrow from each caller to each callee. | call graph: |
| A computed value stored to avoid unnecessary future computation | memo |
| A variable defined outside a function. Global variables can be accessed from any function. | global variable: |
| A statement that declares a variable name global. | global statement: |
| boolean variable used to indicate whether a condition is true. | flag |
| A statement like global that tells the interpreter something about a variable. | declaration |
| An immutable sequence of elements. | tuple |
| An assignment with a sequence on the right side and a tuple of variables on the left. The right side is evaluated and then its elements are assigned to the variables on the left. | tuple assignment: |
| The operation of assembling a variable-length argument tuple. | gather |
| The operation of treating a sequence as a list of arguments. | scatter |
| The result of calling a built-in function zip; an object that iterates through a sequence of tuples. | zip object: |
| An object that can iterate through a sequence, but which does not provide list operators and methods | iterator |
| A collection of related values, often organized in lists, dictionaries, tuples, etc. | data structure: |
| An error caused because a value has the wrong shape; that is, the wrong type or size | shape error: |
| Pertaining to a program that does the same thing each time it runs, given the same inputs. | deterministic |
| Pertaining to a sequence of numbers that appears to be random, but is generated by a deterministic program. | pseudorandom |
| The value given to an optional parameter if no argument is provided. | default value: |
| To replace a default value with an argument. | override |
| The process of choosing between data structures by implementing alternatives and testing them on a sample of the possible inputs | benchmarking |
| Debugging by explaining your problem to an inanimate object such as a rubber duck. Articulating the problem can help you solve it, even if the rubber duck doesn’t know Python. | rubber duck debugging: |
| Pertaining to a program that runs indefinitely and keeps at least some of its data in permanent storage. | persistent: |
| An operator, %, that takes a format string and a tuple and generates a string that includes the elements of the tuple formatted as specified by the format string. | format operator: |
| A string, used with the format operator, that contains format sequences. | format string: |
| A sequence of characters in a format string, like %d, that specifies how a value should be formatted. | format sequence: |
| A sequence of characters stored in permanent storage like a hard drive. | text file: |
| A named collection of files, also called a folder. | directory: |
| A string that identifies a file. | path: |
| A path that starts from the current directory. | relative path: |
| A path that starts from the topmost directory in the file system. | absolute path: |
| To prevent an exception from terminating a program using the try and except statements. | catch: |
| : A file whose contents are organized like a dictionary with keys that correspond to values. | database |
| An object similar to a string. | bytes object: |
| A program that allows users to type commands and then executes them by starting other programs. | shell: |
| An object that represents a running program, allowing a Python program to run commands and read the results. | pipe object: |
| A programmer-defined type. A class definition creates a new class object. | class: |
| : An object that contains information about a programmer-defined type. The class object can be used to create instances of the type. | class object |
| An object that belongs to a class. | instance: |
| To create a new object. | instantiate: |
| : One of the named values associated with an object. | attribute |
| An object that is stored as an attribute of another object. | embedded object: |
| To copy the contents of an object, including any references to embedded objects; implemented by the copy function in the copy module. | shallow copy: |
| To copy the contents of an object as well as any embedded objects, and any objects embedded in them, and so on; implemented by the deepcopy function in the copy module. | deep copy: |
| A diagram that shows objects, their attributes, and the values of the attributes | object diagram: |
| A development plan that involves writing a rough draft of a program, testing, and correcting errors as they are found. | prototype and patch: |
| A development plan that involves high-level insight into the problem and more planning than incremental development or prototype development. | designed development: |
| A function that does not modify any of the objects it receives as arguments. Most pure functions are fruitful. | pure function: |
| A function that changes one or more of the objects it receives as arguments. Most modifiers are void; that is, they return None. | modifier: |
| A style of program design in which the majority of functions are pure. | functional programming style: |
| A condition that should always be true during the execution of a program. | invariant: |
| A statement that check a condition and raises an exception if it fails | assert statement: |
| A language that provides features, such as programmer defined types and methods, that facilitate object-oriented programming. | object-oriented language: |
| A style of programming in which data and the operations that manipulate it are organized into classes and methods. | object-oriented programming: |
| A function that is defined inside a class definition and is invoked on instances of that class. | method: |
| The object a method is invoked on. | subject: |
| An argument that does not include a parameter name, so it is not a keyword argument. | positional argument: |
| Changing the behavior of an operator like + so it works with a programmer-defined type. | operator overloading: |
There are no comments, be the first and leave one below:
Want to create your own Flashcards for free with GoConqr? Learn more.