Shared Flashcard Set

Details

Python for Informatics Glossaries combined
Terms taken from the chapter glossaries of the book "Python for Informatics" by Charles Severance
166
Computer Science
6th Grade
03/16/2015

Additional Computer Science Flashcards

 


 

Cards

Term
bug
Definition
An error in a program.
Term
central processing unit
Definition
The heart of any computer. It is what runs the software that we write; also called "CPU" or "the processor."
Term
compile
Definition
To translate a program written in a high-level language into a low-level language all at once, in preparation for later execution.
Term
high-level language
Definition
A programming language like Python that is designed to be easy for humans to read and write.
Term
interactive mode
Definition
A way of using the Python interpreter by typing commands and expressions at the prompt.
Term
interpret
Definition
To execute a program in a high-level language by translating it one line at a time.
Term
low-level language
Definition
A programming language that is designed to be easy for a computer to execute; also called "machine code" or "assembly language."
Term
machine code
Definition
The lowest level language for software which is the language that is directly executed by the central processing unit (CPU).
Term
main memory
Definition
Stores programs and data. Main memory loses its information when the power is turned off.
Term
parse
Definition
To examine a program and analyze the syntactic structure.
Term
portability
Definition
A property of a program that can run on more than one kind of computer.
Term
print statement
Definition
An instruction that causes the Python interpreter to display a value on the screen.
Term
problem solving
Definition
The process of formulating a problem, finding a solution, and expressing the solution.
Term
program
Definition
A set of instructions that specifies a computation.
Term
prompt
Definition
When a program displays a message and pauses for the user to type some input to the program.
Term
secondary memory
Definition
Stores programs and data and retains its information even when the power is turned off. Generally slower than main memory. Examples of secondary memory include disk drives and flash memory in USB sticks.
Term
semantics
Definition
The meaning of a program.
Term
semantic error
Definition
An error in a program that makes it do something other than what the programmer intended.
Term
source code
Definition
A program in a high-level language.
Term
assignment
Definition
A statement that assigns a value to a variable.
Term
concatenate
Definition
To join two operands end-to-end.
Term
comment
Definition
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.
Term
evaluate
Definition
To simplify an expression by performing the operations in order to yield a single value.
Term
expression
Definition
A combination of variables, operators, and values that represents a single result value.
Term
floating-point
Definition
A type that represents numbers with fractional parts.
Term
floor division
Definition
The operation that divides two numbers and chops off the fraction part.
Term
integer
Definition
A type that represents whole numbers.
Term
keyword
Definition
A reserved word that is used by the compiler to parse a program; you cannot use keywords like if, def, and while as variable names.
Term
mnemonic
Definition
A memory aid. We often give variables mnemonic names to help us remember what is stored in the variable.
Term
modulus operator
Definition
An operator, denoted with a percent sign (%), that works on integers and yields the remainder when one number is divided by another.
Term
operand
Definition
One of the values on which an operator operates.
Term
operator
Definition
A special symbol that represents a simple computation like addition, multiplication, or string concatenation.
Term
rules of precedence
Definition
The set of rules governing the order in which expressions involving multiple operators and operands are evaluated.
Term
statement
Definition
A section of code that represents a command or action. So far, the statements we have seen are assignments and print statements.
Term
string
Definition
A type that represents sequences of characters.
Term
type
Definition
A category of values. The types we have seen so far are integers (type int), floating-point numbers (type float), and strings (type str).
Term
value
Definition
One of the basic units of data, like a number or string, that a program manipulates.
Term
variable
Definition
A name that refers to a value.
Term
body
Definition
The sequence of statements within a compound statement.
Term
boolean expression
Definition
An expression whose value is either True or False.
Term
branch
Definition
One of the alternative sequences of statements in a conditional statement.
Term
chained conditional
Definition
A conditional statement with a series of alternative branches.
Term
comparison operator
Definition
One of the operators that compares its operands
Term
conditional statement
Definition
A statement that controls the flow of execution depending on some condition.
Term
condition
Definition
The boolean expression in a conditional statement that determines which branch is executed.
Term
compound statement
Definition
A statement that consists of a header and a body. The header ends with a colon (
Term
guardian pattern
Definition
Where we construct a logical expression with additional comparisons to take advantage of the short circuit behavior.
Term
logical operator
Definition
One of the operators that combines boolean expressions
Term
nested conditional
Definition
A conditional statement that appears in one of the branches of another conditional statement.
Term
traceback
Definition
A list of the functions that are executing, printed when an exception occurs.
Term
short circuit
Definition
When Python is part-way through evaluating a logical expression and stops the evaluation because Python knows the final value for the expression without needing to evaluate the rest of the expression.
Term
algorithm
Definition
A general process for solving a category of problems.
Term
argument
Definition
A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function.
Term
body
Definition
The sequence of statements inside a function definition.
Term
composition
Definition
Using an expression as part of a larger expression, or a statement as part of a larger statement.
Term
deterministic
Definition
Pertaining to a program that does the same thing each time it runs, given the same inputs.
Term
dot notation
Definition
The syntax for calling a function in another module by specifying the module name followed by a dot (period) and the function name.
Term
flow of execution
Definition
The order in which statements are executed during a program run.
Term
fruitful function
Definition
A function that returns a value.
Term
function
Definition
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.
Term
function call
Definition
A statement that executes a function. It consists of the function name followed by an argument list.
Term
function definition
Definition
A statement that creates a new function, specifying its name, parameters, and the statements it executes.
Term
function object
Definition
A value created by a function definition. The name of the function is a variable that refers to a function object.
Term
header
Definition
The first line of a function definition.
Term
import statement
Definition
A statement that reads a module file and creates a module object.
Term
module object
Definition
A value created by an import statement that provides access to the data and code defined in a module.
Term
parameter
Definition
A name used inside a function to refer to the value passed as an argument.
Term
pseudorandom
Definition
Pertaining to a sequence of numbers that appear to be random, but are generated by a deterministic program.
Term
return value
Definition
The result of a function. If a function call is used as an expression, the return value is the value of the expression.
Term
void function
Definition
A function that doesn’t return a value.
Term
accumulator
Definition
A variable used in a loop to add up or accumulate a result.
Term
counter
Definition
A variable used in a loop to count the number of times something happened. We initialize a counter to zero and then increment the counter each time we want to "count" something.
Term
decrement
Definition
An update that decreases the value of a variable.
Term
initialize
Definition
An assignment that gives an initial value to a variable that will be updated.
Term
increment
Definition
An update that increases the value of a variable (often by one).
Term
infinite loop
Definition
A loop in which the terminating condition is never satisfied or for which there is no termination condition.
Term
iteration
Definition
Repeated execution of a set of statements using either a recursive function call or a loop.
Term
counter
Definition
A variable used to count something, usually initialized to zero and then incremented.
Term
empty string
Definition
A string with no characters and length 0, represented by two quotation marks.
Term
format operator
Definition
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.
Term
format sequence
Definition
A sequence of characters in a format string, like %d, that specifies how a value should be formatted.
Term
format string
Definition
A string, used with the format operator, that contains format sequences.
Term
flag
Definition
A boolean variable used to indicate whether a condition is true.
Term
invocation
Definition
A statement that calls a method.
Term
immutable
Definition
The property of a sequence whose items cannot be assigned.
Term
index
Definition
An integer value used to select an item in a sequence, such as a character in a string.
Term
item
Definition
One of the values in a sequence.
Term
method
Definition
A function that is associated with an object and called using dot notation.
Term
object
Definition
Something a variable can refer to. For now, you can use "object" and "value" interchangeably.
Term
search
Definition
A pattern of traversal that stops when it finds what it is looking for.
Term
sequence
Definition
An ordered set; that is, a set of values where each value is identified by an integer index.
Term
slice
Definition
A part of a string specified by a range of indices.
Term
traverse
Definition
To iterate through the items in a sequence, performing a similar operation on each.
Term
catch
Definition
To prevent an exception from terminating a program using the try and except statements.
Term
newline
Definition
A special character used in files and strings to indicate the end of a line.
Term
Pythonic
Definition
A technique that works elegantly in Python. "Using try and except is the Pythonic way to recover from missing files.".
Term
Quality Assurance
Definition
A person or team focused on insuring the overall quality of a software product. QA is often involved in testing a product and identifying problems before the product is released.
Term
text file
Definition
A sequence of characters stored in permanent storage like a hard drive.
Term
aliasing
Definition
A circumstance where two or more variables refer to the same object.
Term
delimiter
Definition
A character or string used to indicate where a string should be split.
Term
element
Definition
One of the values in a list (or other sequence), also called items.
Term
equivalent
Definition
Having the same value.
Term
index
Definition
An integer value that indicates an element in a list.
Term
identical
Definition
Being the same object (which implies equivalence).
Term
list
Definition
A sequence of values.
Term
list traversal
Definition
The sequential accessing of each element in a list.
Term
nested list
Definition
A list that is an element of another list.
Term
object
Definition
Something a variable can refer to. An object has a type and a value.
Term
reference
Definition
The association between a variable and its value.
Term
dictionary
Definition
A mapping from a set of keys to their corresponding values.
Term
hashtable
Definition
The algorithm used to implement Python dictionaries.
Term
hash function
Definition
A function used by a hashtable to compute the location for a key.
Term
histogram
Definition
A set of counters.
Term
implementation
Definition
A way of performing a computation.
Term
item
Definition
Another name for a key-value pair.
Term
key
Definition
An object that appears in a dictionary as the first part of a key-value pair.
Term
key-value pair
Definition
The representation of the mapping from a key to a value.
Term
lookup
Definition
A dictionary operation that takes a key and finds the corresponding value.
Term
nested loops
Definition
When there is one or more loops "inside" of another loop. The inner loop runs to completion each time the outer loop runs once.
Term
value
Definition
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."
Term
comparable
Definition
A type where one value can be checked to see if it is greater than, less than or equal to another value of the same type. Types which are comparable can be put in a list and sorted.
Term
data structure
Definition
A collection of related values, often organized in lists, dictionaries, tuples, etc.
Term
DSU
Definition
Abbreviation of "decorate-sort-undecorate," a pattern that involves building a list of tuples, sorting, and extracting part of the result.
Term
gather
Definition
The operation of assembling a variable-length argument tuple.
Term
hashable
Definition
A type that has a hash function. Immutable types like integers, floats and strings are hashable; mutable types like lists and dictionaries are not.
Term
scatter
Definition
The operation of treating a sequence as a list of arguments.
Term
shape (of a data structure)
Definition
A summary of the type, size and composition of a data structure.
Term
singleton
Definition
A list (or other sequence) with a single element.
Term
tuple
Definition
An immutable sequence of elements.
Term
tuple assignment
Definition
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.
Term
brittle code
Definition
Code that works when the input data is in a particular format but prone to breakage if there is some deviation from the correct format. We call this "brittle code" because it is easily broken.
Term
greedy matching
Definition
The notion that the "+" and "*" characters in a regular expression expand outward to match the largest possible string.
Term
grep
Definition
A command available in most Unix systems that searches through text files looking for lines that match regular expressions. The command name stands for "Generalized Regular Expression Parser".
Term
regular expression
Definition
A language for expressing more complex search strings. A regular expression may contain special characters that indicate that a search only matches at the beginning or end of a line or many other similar capabilities.
Term
wild card
Definition
A special character that matches any character. In regular expressions the wild card character is the period character.
Term
BeautifulSoup
Definition
A Python library for parsing HTML documents and extracting data from HTML documents that compensates for most of the imperfections in the HTML that browsers generally ignore. You can download the BeautifulSoup code from www.crummy.com.
Term
port
Definition
A number that generally indicates which application you are contacting when you make a socket connection to a server. As an example, web traffic usually uses port 80 while e-mail traffic uses port 25.
Term
scrape
Definition
When a program pretends to be a web browser and retrieves a web page and then looks at the web page content. Often programs are following the links in one page to find the next page so they can traverse a network of pages or a social network.
Term
socket
Definition
A network connection between two applications where the applications can send and receive data in either direction.
Term
spider
Definition
The act of a web search engine retrieving a page and then all the pages linked from a page and so on until they have nearly all of the pages on the Internet which they use to build their search index.
Term
API
Definition
Application Program Interface - A contract between applications that defines the patterns of interaction between two application components.
Term
ElementTree
Definition
A built-in Python library used to parse XML data.
Term
JSON
Definition
JavaScript Object Notation- A format that allows for the markup of structured data based on the syntax of JavaScript Objects.
Term
REST
Definition
REpresentational State Transfer - A style of Web Services that provide access to resources within an application using the HTTP protocol.
Term
SOA
Definition
Service Oriented Architecture - when an application is made of components connected across a network.
Term
XML
Definition
eXtensible Markup Language - A format that allows for the markup of structured data.
Term
attribute
Definition
One of the values within a tuple. More commonly called a "column" or "field".
Term
constraint
Definition
When we tell the database to enforce a rule on a field or a row in a table. A common constraint is to insist that there can be no duplicate values in a particular field (i.e. all the values must be unique).
Term
cursor
Definition
A cursor allows you to execute SQL commands in a database and retrieve data from the database. A cursor is similar to a socket or file handle for network connections and files respectively.
Term
database browser
Definition
A piece of software that allows you to directly connect to a database and manipulate the database directly without writing a program.
Term
foreign key
Definition
A numeric key that points to the primary key of a row in another table. Foreign keys establish relationships between rows stored in different tables.
Term
index
Definition
Additional data that the database software maintains as rows are inserted into a table designed to make lookups very fast.
Term
logical key
Definition
A key that the "outside world" uses to look up a particular row. For example in a table of user accounts, a person‚ "e-mail address might be a good candidate as the logical key for the user" data.
Term
normalization
Definition
Designing a data model so that no data is replicated. We store each item of data at one place in the database and reference it elsewhere using a foreign key.
Term
primary key
Definition
A numeric key assigned to each row that is used to refer to one row in a table from another table. Often the database is configured to automatically assign primary keys as rows are inserted.
Term
relation
Definition
An area within a database that contains tuples and attributes. More typically called a "table".
Term
tuple
Definition
A single entry in a database table that is a set of attributes. More typically called "row".
Term
absolute path
Definition
A string that describes where a file or directory is stored that starts at the "top of the tree of directories" so that it can be used to access the file or directory, regardless of the current working directory.
Term
checksum
Definition
See also hashing. The term "checksum" comes from the need to verify if data was garbled as it was sent across a network or written to a backup medium and then read back in. When the data is written or sent, the sending system computes a checksum and also sends the checksum. When the data is read or received, the receiving system re-computes the checksum from the received data and compares it to the received checksum. If the checksums do not match, we must assume that the data was garbled as it was transferred.
Term
command line argument
Definition
Parameters on the command line after the Python file name.
Term
current working directory
Definition
The current directory that you are "in". You can change your working directory using the cd command on most systems in their command-line interfaces. When you open a file in Python using just the file name with no path information the file must be in the current working directory where you are running the program.
Term
hashing
Definition
Reading through a potentially large amount of data and producing a unique checksum for the data. The best hash functions produce very few "collisions" where you can give two different streams of data to the hash function and get back the same hash. MD5, SHA1, and SHA256 are examples of commonly used hash functions.
Term
pipe
Definition
A pipe is a connection to a running program. Using a pipe, you can write a program to send data to another program or receive data from that program. A pipe is similar to a socket except that a pipe can only be used to connect programs running on the same computer (i.e. not across a network).
Term
relative path
Definition
A string that describes where a file or directory is stored relative to the current working directory.
Term
shell
Definition
A command-line interface to an operating system. Also called a "terminal program" in some systems. In this interface you type a command and parameters on a line and press "enter" to execute the command.
Term
walk
Definition
A term we use to describe the notion of visiting the entire tree of directories, sub-directories, sub-sub-directories, until we have visited the all of the directories. We call this "walking the directory tree".
Supporting users have an ad free experience!