Section 1

Preview this deck

Problem Solving

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (166)

Section 1

(50 cards)

Problem Solving

Front

The process of formulating a problem, finding a solution, and expressing the solution

Back

Evaluate

Front

To simplify an expression by performing the operations in order to yield a single value

Back

Interpret

Front

To execute a program in a high-level language by translating it one line at a time.

Back

Operator

Front

A special symbol that represents a simple computation like addition, multiplication, or string concatenation.

Back

Mnemonic

Front

A memory aid. We often give variables mnemonic names to help us remember what is stored in the variable

Back

Value

Front

One of the basic units of data, like a number or string, that a program manipulates.

Back

Floor Division

Front

The operations that divides two numbers and chops off the fraction part

Back

Print statement

Front

An instruction that causes the Python interpreter to display a value on the screen

Back

Portability

Front

A property of a program that can run on more than one kind of computer

Back

Floating-point

Front

A type that represents numbers with fractional parts

Back

Operand

Front

One of the values on which an operator operates

Back

High-level language

Front

A programming language like Python that is designed to be easy for humans to read and write

Back

Assignment

Front

A statement that assigns a value to a variable

Back

Boolean expression

Front

An expression whose value is either True or False

Back

Chained Conditional

Front

A conditional statement with a series of alternative branches.

Back

Compile

Front

To translate a program written in a high-level language into a low-level language all at once, in preparation for later execution

Back

Central Processing Unit (CPU)

Front

The heart of any computer. It is what runs the software that we write; also called "CPU" or "the processor"

Back

Bug

Front

An error in a program

Back

Machine code

Front

The lowest level language for software which is the language that is directly executed by the central processing unit

Back

Secondary Memory

Front

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.

Back

Rules of precedence

Front

The set of rules governing the order in which expressions involving multiple operators and operands are evaluated

Back

Nested Conditional

Front

A conditional statement that appears in one of the branches of another conditional statement.

Back

Low-level language

Front

A programming language that is designed to be easy for a computer to execute; also called "machine code" or "assembly language."

Back

Comment

Front

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

Back

Integer

Front

A type that represents whole numbers

Back

Comparison Operator

Front

One of the operators that compares its operands: ==, !=, >, <, >=, and <=

Back

Parse

Front

To examine a program and analyze the syntactic structure.

Back

Keyword

Front

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.

Back

String

Front

A type that represents sequences of characters

Back

Main memory

Front

Stores programs and data. Main memory loses its information when the power is turned off.

Back

Logical Operator

Front

One of the operators that combine boolean expressions: and, or, and not.

Back

Semantic Error

Front

An error in a program that makes it do something other than what the programmer intended

Back

Body

Front

The sequence of statements within a compound statement

Back

Guardian Pattern

Front

Where we construct a logical expression with additional comparisons to take advantage of the short circuit behavior.

Back

Expression

Front

A combination of variables, operators, and values that represent a single result value.

Back

Condition

Front

The boolean expression in a conditional statement that determines which branch is executed

Back

Statement

Front

A section of code that represents a command or action. So far, the statements we have seen are assignments and print statements.

Back

Conditional Statement

Front

A statement that controls the flow of execution depending on some condition

Back

Program

Front

A set of instructions that specifies a computation

Back

Semantics

Front

The meaning of a program

Back

Concatenate

Front

To join two operands end-to-end

Back

Modulus Operator

Front

An operator, denoted with a percent sign (%) that works on integers and yields the remainder when one number is divided by another.

Back

Variable

Front

A name that refers to a value

Back

Branch

Front

One of the alternative sequences of statements in a conditional statement

Back

Prompt

Front

When a program displays a message and pauses for the user to type some input to the program

Back

Traceback

Front

A list of the functions that are executing, printed when an exception occurs.

Back

Type

Front

A category of values. The types we have seen so far are integers (type int), floating-point numbers (type float), and strings (type str).

Back

Source Code

Front

A program in a high-level language

Back

Compound Statement

Front

A statement that consists of a header and a body. The header ends with a colon (:). The body is indented relative to the header.

Back

Interactive Mode

Front

A way of using the Python interpreter by typing commands and expressions at the prompt.

Back

Section 2

(50 cards)

Function Call

Front

A statement that executes a function. IT consists of the function name followed by an argument list.

Back

Aliasing

Front

A circumstance where two or more variables refer to the same object

Back

Import Statement

Front

A statement that reads a module file and creates a module object.

Back

Deterministic

Front

Pertaining to a program that does the same thing each time it runs, given the same inputs.

Back

Format Operator

Front

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

Back

Initialize

Front

An assignment that gives an initial value to a variable that will be updated

Back

Immutable

Front

The property of a sequence whose items cannot be assigned

Back

Algorithm

Front

A general process for solving a category of problems.

Back

Function Object

Front

A value created by a function definition. The name of the function is a variable that refers to a function object.

Back

Index

Front

An integer value used to select an item in a sequence, such as a character in a string.

Back

Format string

Front

A string, used with the format operator, that contains format sequences.

Back

Iteration

Front

Repeated execution of a set of statements using either a recursive function call or a loop

Back

Return value

Front

The result of a function. If a function call is used as an expression, the return value is the value of the expression.

Back

Object

Front

Something a variable can refer to. For now, you can use "object" and value" interchangeably.

Back

Format sequence

Front

A sequence of characters in a format string, lie %d, that specifies how a value should be formatted.

Back

Function

Front

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.

Back

Increment

Front

An update that increases the value of a variable (often by one)

Back

Counter

Front

A variable used to count something, usually initialized to zero and then incremented.

Back

Function Definition

Front

A statement that creates a new function, specifying its name, parameters, and the statements it executes.

Back

Pseudorandom

Front

Pertaining to a sequence of numbers that appear to be random, but are generated by a deterministic program.

Back

Infinite Loop

Front

A loop in which the terminating condition is never satisfied or for which there is no termination condition.

Back

Newline

Front

A special character used in files and strings to indicate the end of a line

Back

Short Circuit

Front

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.

Back

Heaader

Front

The first line of a function definition

Back

Accumulator

Front

A variable used in a loop to add up or accumulate a result

Back

Pythonic

Front

A technique that works elegantly in Python. "Using try and except is the Pythonic way to recover from missing files"

Back

Composition

Front

Using an expression as part of a larger expression, or a statement as part of a larger statement

Back

Decrement

Front

An update that decreases the value of a variable

Back

Module Object

Front

A value created by an import statement that provides access to the data and code defined in a module.

Back

Text FIle

Front

A sequence of characters stored in permanent storage like a hard drive.

Back

Parameter

Front

A name used inside a function to refer to the value passed as an argument.

Back

Invocation

Front

A statement that calls a method

Back

Item

Front

One of the values in a sequence.

Back

Search

Front

A pattern of traversal that stops when it finds what it is looking for

Back

Traverse

Front

To iterate through the items in a sequence, performing a similar operation on each.

Back

Slice

Front

A part of a string specified by a range of indices.

Back

Empty String

Front

A string with no characters and length 0, represented by two quotation mars.

Back

Flow of Execution

Front

The order in which statements are executed during a program run.

Back

Quality Assurance

Front

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.

Back

Catch

Front

To prevent an exception from terminating a program using the try and except statements

Back

Sequence

Front

An ordered set; that is, a set of values where each value is identified by an integer index.

Back

Dot Notation

Front

The syntax for calling a function in another module by specifying the module name followed by a dot(period) and the function name.

Back

Body

Front

The sequence of statements inside a function definition

Back

Argument

Front

A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function.

Back

Delimiter

Front

A character or string used to indicate where a string should be split

Back

Flag

Front

A boolean variable used to indicate whether a condition is true.

Back

Fruitful Function

Front

A function that returns a value

Back

Void function

Front

A function that doesn't return a value.

Back

Counter

Front

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.

Back

Method

Front

A function that is associated with an object and called using dot notation.

Back

Section 3

(50 cards)

Grep

Front

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".

Back

Equivalent

Front

Having the same value

Back

Idential

Front

Being the same object (which implies equivalence).

Back

Scrape

Front

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 can traverse a network of pages or a social network.

Back

JSON

Front

JavaScript Object Notation - A format that allows for the markup of structured data based on the syntax of JavaScript Objects.

Back

Element

Front

One of the values in a list (or other sequence), also called items

Back

Port

Front

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.

Back

Object

Front

SOmething a variable can refer to. An object has a type and a value

Back

Attribute

Front

One of the values within a tuple. More commonly called a "column" or "field"

Back

Histogram

Front

A set of counters

Back

Implementation

Front

A way of performing a computation

Back

XML

Front

eXtensible MArup Language - A format that allows for the markup of structured data

Back

Nested Loops

Front

When there is one or more loops "inside" of another loop. The inner loop runs to completion each time the outer loop runs once.

Back

Index

Front

An integer value that indicates an element in a list

Back

Dictionary

Front

A mapping from a set of keys to their corresponding values

Back

Regular Expression

Front

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.

Back

Item

Front

Another name for a key-value pair

Back

Hash function

Front

A function used by a hashtable to compute the location for a key

Back

Database Browser

Front

A piece of software that allows you to directly connect to a database and manipulate the database directly without writing a program

Back

API

Front

Application Program Interface - A contract between applications that defines the patterns of interaction between two application components

Back

Scatter

Front

The operation of treating a sequence as a list of arguments

Back

Singleton

Front

A list (or other elements) with a single element

Back

Hashable

Front

A type that has a hash function. Imutable types like integers, floats, and strings are hashable; mutable types lie lists and dictionaries are not.

Back

Lookup

Front

A dictionary operation that takes a key and finds the corresponding value

Back

List Traversal

Front

The sequential accessing of each element in a list

Back

Nested List

Front

A list that is an element of another list

Back

Socket

Front

A network connection between two applications where the applications can send and receive data in either direction

Back

Key-value pair

Front

The representation of the mapping from a key to a value

Back

List

Front

A sequence of values

Back

ElementTree

Front

A built-in Python library used to parse XML data

Back

Brittle Code

Front

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

Back

Comparable

Front

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.

Back

DSU

Front

Abbreviation of "decorate-sort-undecorate," a pattern that involves building a list of tuples, sorting, and extracting part of rthe result.

Back

Hashtable

Front

The algorithm used to implement Python dictionaries

Back

Reference

Front

The association between a variable and its value

Back

Wild card

Front

A special character that matches any character. In regular expressions the wild card character is the period character.

Back

Tuple Assignment

Front

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.

Back

Gather

Front

The operation of assembling a variable-length argument tuple.

Back

Key

Front

An object that appears in a dictionary as the first part of a key-value pair

Back

REST

Front

REpresentational State Transfer - A style of Web Services that provide access to resources within an application using the HTTP protocol

Back

Shape (of a data structure):

Front

A summary of the type, size, and composition of a data structure

Back

Value

Front

An object that appears in a dictionary as the second part of the key-value pair. This is more specific than our previous use of the word 'value.'

Back

Greedy Matching

Front

The notion that "+" and "*" characters in a regular expression expand outward to match the largest possible string.

Back

Data Structure

Front

A collection of related values, often organized in lists, dictionaries, tuples, etc.

Back

Tuple

Front

An immutable sequence of elements

Back

BeautifulSoup

Front

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

Back

Cursor

Front

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.

Back

SOA

Front

Service Oriented Architecture - When an application is made of components connected across a network

Back

Spider

Front

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.

Back

Constraint

Front

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).

Back

Section 4

(16 cards)

Index

Front

Additional data that the database software maintains as rows are inserted into a table designed to make lookups very fast

Back

Relation

Front

An area within a database that contains tuples and attributes. More typically called a "table".

Back

Walk

Front

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".

Back

Primary Key

Front

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.

Back

Current working directory

Front

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 current working directory where you are running the program.

Back

Command Line Argument

Front

Parameters on the command line after the Python file name

Back

Shell

Front

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

Back

Checksum

Front

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.

Back

Tuple

Front

A single entry in a database table that is a set of attributes. More typically called "row".

Back

Relative PAth

Front

A string that describes where a file or directory is stored relative to the current working directory

Back

Logical Key

Front

A key that the "outside world" uses to look up a particular row. For example in a table of user accounts, a person's email address might be a good candidate as the logical key for the user's data.

Back

Normalization

Front

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.

Back

Absolute Path

Front

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

Back

Hashing

Front

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.

Back

Foreign Keys

Front

A numeric key that points to the primary ey of a row in another table. Foreign keys establish relationships between rows stored in different tables.

Back

Pipe

Front

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)

Back