Python Vocabulary - Webpage
Python Vocabulary - Webpage
problem solving
The process of formulating a problem, finding a solution, and expressing the solution.
high-level language
A programming language like Python that is designed to be easy for humans to read and write.
low-level language
A programming language that is designed to be easy for a computer to execute; also called
“machine language” or “assembly language.”
portability
A property of a program that can run on more than one kind of computer.
interpret
compile
To translate a program written in a high-level language into a low-level language all at once, in
preparation for later execution.
source code
object code
executable
prompt
Characters displayed by the interpreter to indicate that it is ready to take input from the user.
script
interactive mode
A way of using the Python interpreter by typing commands and expressions at the prompt.
script mode
A way of using the Python interpreter to read and execute statements in a script.
program
algorithm
A general process for solving a category of problems.
bug
An error in a program.
debugging
The process of finding and removing any of the three kinds of programming errors.
syntax
syntax error
exception
semantics
semantic error
An error in a program that makes it do something other than what the programmer intended.
natural language
Any one of the languages that people speak that evolved naturally.
formal 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
_______ .
token
One of the basic elements of the syntactic structure of a program, analogous to a word in a
natural language.
parse
print statement
An instruction that causes the Python interpreter to display a value on the screen.
Level 2
Options
18 words0 ignored
Ignore Ready to learn Ready to review
value
One of the basic units of data, like a number or string, that a program
manipulates.
type
A category of values.
integer
A type that represents whole numbers.
floating-point
A type that represents numbers with fractional parts.
string
A type that represents sequences of characters.
variable
A name that refers to a value.
statement
A section of code that represents a command or action.
assignment
A statement that assigns a value to a variable.
state diagram
A graphical representation of a set of variables and the values they refer to.
keyword
A reserved word that is used by the compiler to parse a program.
operator
A special symbol that represents a simple computation like addition,
multiplication, or string concatenation.
operand
One of the values on which an operator operates.
floor division
The operation that divides two numbers and chops off the fraction part.
expression
A combination of variables, operators, and values that represents a single
result value.
evaluate
To simplify an expression by performing the operations in order to yield a
single value.
rules of precedence
The set of rules governing the order in which expressions involving multiple
operators and operands are evaluated.
concatenate
To join two operands end-to-end.
comment
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.
Level 3
Level 3
Chapter 3: Functions
Options
Options
11 words0 ignored
Ignore Ready to learn Ready to review
instance
A member of a set.
loop
A part of a program that can execute repeatedly.
encapsulation
The process of transforming a sequence of statements into a function
definition.
generalization
The process of replacing something unnecessarily specific (like a number)
with something appropriately general (like a variable or parameter).
keyword argument
An argument that includes the name of the parameter as a “keyword.”
interface
A description of how to use a function, including the name and descriptions
of the arguments and return value.
refactoring
The process of modifying a working program to improve function interfaces
and other qualities of the code.
development plan
A process for writing programs.
docstring
A string that appears in a function definition to document the function’s
interface.
precondition
A requirement that should be satisfied by the caller before a function starts.
postcondition
A requirement that should be satisfied by the function before it ends.
Level 5
Level 5
Options
13 words0 ignored
Ignore Ready to learn Ready to review
modulus operator
An operator, denoted with a percent sign (%), that works on integers and
yields the remainder when one number is divided by another.
boolean expression
An expression whose value is either True or False.
relational operator
One of the operators that compares its operands: ==, !=, >, <, >=, and <=.
logical operator
One of the operators that combines boolean expressions: and, or, and not.
conditional statement
A statement that controls the flow of execution depending on some
condition.
condition
The boolean expression in a conditional statement that determines which
branch is executed.
compound statement
A statement that consists of a header and a body. The header ends with a
colon (:). The body is indented relative to the header.
branch
One of the alternative sequences of statements in a conditional statement.
chained conditional
A conditional statement with a series of alternative branches.
nested conditional
A conditional statement that appears in one of the branches of another
conditional statement.
recursion
The process of calling the function that is currently executing.
base case
A conditional branch in a recursive function that does not make a recursive
call.
infinite recursion
A recursion that doesn’t have a base case, or never reaches it. Eventually, it
causes a runtime error.
Level 6
Level 6
Options
Level 7
Chapter 7: Iteration
Options
7 words0 ignored
Ignore Ready to learn Ready to review
multiple assignment
Making more than one assignment to the same variable during the
execution of a program.
update
An assignment where the new value of the variable depends on the old.
initialization
An assignment that gives an initial value to a variable that will be updated.
increment
An update that increases the value of a variable (often by one).
decrement
An update that decreases the value of a variable.
iteration
Repeated execution of a set of statements using either a recursive function
call or a loop.
infinite loop
A loop in which the terminating condition is never satisfied.
Level 8
Chapter 8: Strings
Options
Level 9
Level 9
Options
3 words0 ignored
Ignore Ready to learn Ready to review
file object
A value that represents an open file.
problem recognition
A way of solving a problem by expressing it as an instance of a previously-
solved problem.
special case
A test case that is atypical or non-obvious (and less likely to be handled
correctly).
Level 10
Level 10
Options
17 words0 ignored
Ignore Ready to learn Ready to review
list
A sequence of values.
element
One of the values in a list (or other sequence), also called items.
index
An integer value that indicates an element in a list.
nested list
A list that is an element of another list.
list traversal
The sequential accessing of each element in a list.
mapping
A relationship in which each element of one set corresponds to an element
of another set. For example, a list is a mapping from indices to elements.
accumulator
A variable used in a loop to add up or accumulate a result.
augmented assignment
A statement that updates the value of a variable using an operator like +=.
reduce
A processing pattern that traverses a sequence and accumulates the
elements into a single result.
map
A processing pattern that traverses a sequence and performs an operation
on each element.
filter
A processing pattern that traverses a list and selects the elements that
satisfy some criterion.
object
Something a variable can refer to. An object has a type and a value.
equivalent
Having the same value.
identical
Being the same object (which implies equivalence).
reference
The association between a variable and its value.
aliasing
A circumstance where two or more variables refer to the same object.
delimiter
A character or string used to indicate where a string should be split.
Level 11
Level 11
Options
18 words0 ignored
Ignore Ready to learn Ready to review
dictionary
A mapping from a set of keys to their corresponding values.
key-value pair
The representation of the mapping from a key to a value.
item
Another name for a key-value pair.
key
An object that appears in a dictionary as the first part of a key-value pair.
value
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.”
implementation
A way of performing a computation.
hashtable
The algorithm used to implement Python dictionaries.
hash function
A function used by a hashtable to compute the location for a key.
hashable
A type that has a hash function. Immutable types like integers, floats and
strings are hashable; mutable types like lists and dictionaries are not.
lookup
A dictionary operation that takes a key and finds the corresponding value.
reverse lookup
A dictionary operation that takes a value and finds one or more keys that
map to it.
singleton
A list (or other sequence) with a single element.
call graph
A diagram that shows every frame created during the execution of a
program, with an arrow from each caller to each callee.
histogram
A set of counters.
memo
A computed value stored to avoid unnecessary future computation.
global variable
A variable defined outside a function. Global variables can be accessed from
any function.
flag
A boolean variable used to indicate whether a condition is true.
declaration
A statement like global that tells the interpreter something about a variable.
Level 12
Level 12
Options
Level 13
Level 13
Options
5 words0 ignored
Ignore Ready to learn Ready to review
deterministic
Pertaining to a program that does the same thing each time it runs, given
the same inputs.
pseudorandom
Pertaining to a sequence of numbers that appear to be random, but are
generated by a deterministic program.
default value
The value given to an optional parameter if no argument is provided.
override
To replace a default value with an argument.
benchmarking
The process of choosing between data structures by implementing
alternatives and testing them on a sample of the possible inputs.
Level 14
Level 14
Options
Options
8 words0 ignored
Ignore Ready to learn Ready to review
class
A user-defined type. A class definition creates a new class object.
class object
An object that contains information about a user-defined type. The class
object can be used to create instances of the type.
instance
An object that belongs to a class.
attribute
One of the named values associated with an object.
embedded (object)
An object that is stored as an attribute of another object.
shallow copy
To copy the contents of an object, including any references to embedded
objects; implemented by the copy function in the copy module.
deep 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.
object diagram
A diagram that shows objects, their attributes, and the values of the
attributes.
Level 16
Level 16
Options
6 words0 ignored
Ignore Ready to learn Ready to review
prototype and patch
A development plan that involves writing a rough draft of a program,
testing, and correcting errors as they are found.
planned development
A development plan that involves high-level insight into the problem and
more planning than incremental development or prototype development.
pure function
A function that does not modify any of the objects it receives as arguments.
Most pure functions are fruitful.
modifier
A function that changes one or more of the objects it receives as
arguments. Most modifiers are fruitless.
functional programming style
A style of program design in which the majority of functions are pure.
invariant
A condition that should always be true during the execution of a program.
Level 17
Options
Level 18
Options
Level 19
Options
14 words0 ignored
Ignore Ready to learn Ready to review
GUI
A graphical user interface.
widget
One of the elements that makes up a GUI, including buttons, menus, text
entry fields, etc.
option
A value that controls the appearance or function of a widget.
keyword argument
An argument that indicates the parameter name as part of the function call.
callback
A function associated with a widget that is called when the user performs
an action.
bound method
A method associated with a particular instance.
event-driven programming
A style of programming in which the flow of execution is determined by
user actions.
event
A user action, like a mouse click or key press, that causes a GUI to respond.
event loop
An infinite loop that waits for user actions and responds.
item
A graphical element on a Canvas widget.
bounding box
A rectangle that encloses a set of items, usually specified by two opposing
corners.
pack
To arrange and display the elements of a GUI.
geometry manager
A system for packing widgets.
binding
An association between a widget, an event, and an event handler. The event
handler is called when the event occurs in the widget.