Section 1

Preview this deck

==

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 (113)

Section 1

(50 cards)

==

Front

testing if two things have the same value

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

\uxxxx

Front

Character with 16-bit hex value xxxx (Unicode only)

Back

\a

Front

ASCII Bell (BEL)

Back

float

Front

converts integers and strings to floating-point numbers float('3.14159') 3.14159

Back

\b

Front

ASCII Backspace (BS)

Back

from math import *

Front

imports everything from math module all that is in the module may be accessed without dot notation: >>> cos(pi) -1.0

Back

from math import pi

Front

imports pi from math module pi can be accessed without dot notation: >>> print pi 3.14159265359

Back

function call

Front

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

Back

\Uxxxxxxxx

Front

Character with 32-bit hex value xxxxxxxx (Unicode only)

Back

\t ASCII

Front

Horizontal Tab (TAB)

Back

+ (strings)

Front

concatenation

Back

\f

Front

ASCII Formfeed (FF)

Back

\t*

Front

indent and an asterisk

Back

variable

Front

A name that refers to a value.

Back

\N{name}

Front

character named name in the Unicode database (Unicode only)

Back

fruitful function

Front

A function that returns a value.

Back

\xhh

Front

Character with hex value hh

Back

string

Front

A type that represents sequences of characters.

Back

\ooo

Front

Character with octal value oo

Back

floating-point

Front

A type that represents numbers with fractional parts.

Back

return variable

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

assignment

Front

A statement that assigns a value to a variable.

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

\r ASCII

Front

Carriage Return (CR)

Back

function definition (def)

Front

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

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

local variable

Front

A variable defined inside a function. A local variable can only be used inside its function.

Back

void function

Front

A function that doesn't return a value.

Back

=

Front

defines variable

Back

str

Front

converts its argument to a string

Back

value

Front

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

Back

operator

Front

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

Back


Front

ASCII Linefeed (LF)

Back

* (strings)

Front

repetition e.g. print "Love" * 3 -> LoveLoveLove

Back

parameter

Front

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

Back

statement

Front

A section of code that represents a command or action (assignment, print).

Back

expression

Front

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

Back

**

Front

exponentiation

Back

header

Front

The first line of a function definition.

Back

operand

Front

One of the values on which an operator operates.

Back

integer

Front

A type that represents whole numbers.

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

floor division

Front

The operation that divides two numbers and chops off the fraction part.

Back

int

Front

converts floating-point values to integers by chopping off the fraction part

Back

\\

Front

prints \

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

\v

Front

ASCII Vertical Tab (VT)

Back

def

Front

keyword, indicates a function definition

Back

body

Front

The sequence of statements inside a function definition.

Back

Section 2

(50 cards)

recursion

Front

The process of calling the function that is currently executing.

Back

stack diagram

Front

A graphical representation of a stack of functions, their variables, and the values they refer to.

Back

condition

Front

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

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

incremental development

Front

A program development plan intended to avoid debugging by adding and testing only a small amount of code at a time.

Back

infinite recursion

Front

A recursion that doesn't have a base case, or never reaches it. Eventually, an infinite recursion causes a runtime error.

Back

logical operator

Front

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

Back

import statement

Front

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

Back

boolean expression

Front

An expression whose value is either True or False.

Back

multiple asignment

Front

Making more than one assignment to the same variable during the execution of a program.

Back

precondition

Front

A requirement that should be satisfied by the caller before a function starts.

Back

raw_input()

Front

function which prompts user to enter something, returns strings

Back

loop

Front

a part of a program that can execute repeatedly

Back

guardian

Front

A programming pattern that uses a conditional statement to check for and handle circumstances that might cause an error.

Back

branch

Front

One of the alternative sequences of statements in a conditional statement.

Back

module

Front

A file that contains a collection of related functions and other definitions.

Back

iteration

Front

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

Back

conditional statement

Front

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

Back

traceback

Front

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

Back

x != y

Front

x is not equal to y

Back

nested conditional

Front

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

Back

relational operator

Front

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

Back

initialization

Front

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

Back

infinite loop

Front

A loop in which the terminating condition is never satisfied.

Back

generalization

Front

The process of replacing something unnecessarily specific (like a number) with something appropriately general (like a variable or parameter).

Back

development plan

Front

A process for writing programs.

Back

state diagram

Front

A graphical representation of a set of variables and the values they refer to.

Back

None

Front

A special value returned by functions that have no return statement or a return statement without an argument.

Back

refactoring

Front

The process of modifying a working program to improve function interfaces and other qualities of the code.

Back

module object

Front

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

Back

encapsulation

Front

The process of transforming a sequence of statements into a function definition.

Back

dead code

Front

Part of a program that can never be executed, often because it appears after a return statement.

Back

object

Front

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

Back

chained conditional

Front

A conditional statement with a series of alternative branches.

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

update

Front

An assignment where the new value of the variable depends on the old.

Back

instance

Front

a member of a set

Back

composition

Front

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

Back

increment

Front

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

Back

interface

Front

A description of how to use a function, including the name and descriptions of the arguments and return value.

Back

sequence

Front

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

Back

postcondition

Front

A requirement that should be satisfied by the function before it ends

Back

decrement

Front

An update that decreases the value of a variable.

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

keyword argument

Front

An argument that includes the name of the parameter as a "keyword." (in function call) function (a = 15, b = bob)

Back

tmporary variable

Front

A variable used to store an intermediate value in a complex calculation.

Back

scaffolding

Front

Code that is used during program development but is not part of the final version.

Back

flow of execution

Front

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

Back

base case

Front

A conditional branch in a recursive function that does not make a recursive call.

Back

docstring

Front

A string that appears in a function definition to document the function's interface.

Back

Section 3

(13 cards)

empty string

Front

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

Back

problem recognition

Front

A way of solving a problem by expressing it as an instance of a previously-solved problem.

Back

item

Front

One of the values in a sequence.

Back

method

Front

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

Back

traverse

Front

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

Back

immutable

Front

The property of a sequence whose items cannot be assigned.

Back

special case

Front

A test case that is atypical or non-obvious (and less likely to be handled correctly).

Back

counter

Front

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

Back

slice

Front

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

Back

invocation

Front

A statement that calls a method.

Back

index

Front

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

Back

file object

Front

A value that represents an open file.

Back

search

Front

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

Back