Glossary Flashcards

1
Q

algorithm

A

A general, mechanical process for solving a category of problems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

bug

A

An error in a program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

byte code

A

An intermediate language between source code and object code. Many modern languages first compile source code into byte code and then interpret the byte code with a program called a virtual machine.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

compile

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

debugging

A

The process of finding and removing any of the three kinds of programming errors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

executable

A

Another name for object code that is ready to be executed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

formal language

A

languages designed for specific purposes, such as representing mathematical ideas or computer programs; all programming languages are formal languages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

high-level language

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

interpret

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

low-level language

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

natural language

A

Any one of the languages that people speak that evolved naturally.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

object code

A

The output of the compiler after it translates the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

parse

A

To examine a program and analyze the syntactic structure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

portability

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

print statement

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

problem solving

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

program

A

a sequence of instructions that specifies to a computer actions and computations to be performed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Python shell

A

An interactive user interface to the Python interpreter. The user of a Python shell types commands at the prompt (»>), and presses the return key to send these commands immediately to the interpreter for processing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

runtime error

A

An error that does not occur until the program has started to execute but that prevents the program from continuing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

script

A

A program stored in a file (usually one that will be interpreted).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

semantic error

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

semantics

A

The meaning of a program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

source code

A

A program in a high-level language before being compiled.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

syntax

A

The structure of a program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

syntax error

A

An error in a program that makes it impossible to parse — and therefore impossible to interpret.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

token

A

One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

assignment operator

A

= is Python’s assignment operator, which should not be confused with the mathematical comparison operator using the same symbol.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

assignment statement

A

A statement that assigns a value to a name (variable). To the left of the assignment operator, =, is a name. To the right of the assignment operator is an expression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

comment

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

composition

A

The ability to combine simple expressions and statements into compound statements and expressions in order to represent complex computations concisely. Also refers to building functions by calling other functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

composition

A

The ability to combine simple expressions and statements into compound statements and expressions in order to represent complex computations concisely.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

concatenate

A

To join two strings end-to-end.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

data type

A

A set of values. The type of a value determines how it can be used in expressions. So far, the types you have seen are integers (type int), floating-point numbers (type float), and strings (type str).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

evaluate

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

expression

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

float

A

A Python data type which stores floating-point numbers. Floating-point numbers are stored internally in two parts: a base and an exponent. When printed in the standard format, they look like decimal numbers. Beware of rounding errors when you use floats, and remember that they are only approximate values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

int

A

A Python data type that holds positive and negative whole numbers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

integer division

A

An operation that divides one integer by another and yields an integer. Integer division yields only the whole number of times that the numerator is divisible by the denominator and discards any remainder.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

keyword

A

A reserved word that is used by the compiler to parse program; you cannot use keywords like if, def, and while as variable names.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

operand

A

One of the values on which an operator operates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

operator

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

rules of precedence

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

state diagram

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

statement

A

An instruction that the Python interpreter can execute. Examples of statements include the assignment statement and the print statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

str

A

A Python data type that holds a string of characters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

value

A

A number or string (or other things to be named later) that can be stored in a variable or computed in an expression.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

variable

A

A name that refers to a value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

variable name

A

A name given to a variable. Variable names in Python consist of a sequence of letters (a..z, A..Z, and _) and digits (0..9) that begins with a letter. In best programming practice, variable names should be chosen so that they describe their use in the program, making the program self documenting.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

attribute

A

state or value that belongs to a particular object. for example, slim (turtle) has a color.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

canvas

A

a surface within a window where drawing takes place

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

for loop

A

a statement in python for convenient repetition of statements in the body of the loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

instance

A

an object that belongs to a class. slim and cujo are instances of the the class Turtle in the module turtle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

invoke

A

an object has methods. the verb invoke means to activate a method. Invoking a method is done by adding parentheses after the method name and perhaps passing arguments; e.g. window.exitonclick() is an invocation of the exitonclick method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

iteration

A

basic building blocks for algorithms. allows steps to be repeated. sometimes called looping. repeated execution of a sequence of statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

loop body

A

statements nested (indented) inside of a loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

loop variable

A

variable used as part of the for loop. it is assigned a different value for each iteration of the loop and is used as part of the terminating condition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

method

A

a function attached to an object. invoking the method causes the object to respond in some way; e.g. move the turtle forward with slim.forward(50)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

module

A

a file containing definitions and statements for use in other Python programs. the contents of a module are made available to the program using the import statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
59
Q

object

A

a “thing” to which a variable can refer; e.g. slim = turtle.Turtle(). slim is object (and variable?!)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
60
Q

range

A

built-in function for generating sequences of integers. especially useful for a loop that needs to be generated a specific number of times (with the for loop)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

sequential

A

the default behavior of a program; line-by-line processing of the algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
62
Q

state

A

the collection of attribute values that a specific data object maintains

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
63
Q

state

A

the collection of attribute values that a specific data object maintains

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
64
Q

terminating condition

A

condition that, when it occurs, causes a loop to stop repeating its body; e.g. the for loop stops executing when there are no more elements to assign to the loop variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

Turtle

A

a data object used to create pictures (called turtle graphics)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
66
Q

deterministic

A

a process that is repeatable and predictable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
67
Q

documentation

A

a place where you can go to get information about the programming language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
68
Q

pseudo-random number

A

a number that is not genuinely random but is generated algorithmically

69
Q

standard library

A

a collection of modules included in the normal Python installation

70
Q

function

A

a named sequence of statements that belong together

71
Q

compound statement

A

header line and body…the for statement and functions

72
Q

chatterbox function

A

A function which interacts with the user (using input or print) when it should not. Silent functions that just convert their input arguments into their output results are usually the most useful ones

73
Q

composition (of functions)

A

calling one function from within the body of another or using the return value of one function as the argument to the call for another

74
Q

dead code

A

part of the program that never gets executed, often because it appears after the return statement

75
Q

fruitful function

A

a function that yields a return value instead of None

76
Q

incremental development

A

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

77
Q

None

A

A special Python value. One use in Python is that it is returned by functions that do not execute a return statement with a return argument

78
Q

return value

A

the value provided as a result of a function call

79
Q

scaffolding

A

code that is used during program development to assist with development and debugging. doctests is one example

80
Q

temporary variable

A

a variable used to store an intermediate value in a complex calculation. created via an assignment statement in a function

81
Q

function call

A

also referred to as function invocation. name of the function followed by the arguments (assigned to parameters in the function definition).

82
Q

lifetime

A

the time during which a local variable exists

83
Q

local scope

A

the range of statements within a function that represent where the local variables can be accessed

84
Q

global scope

A

the range of statements globally that represent where the local variables can be accessed

85
Q

shadowing

A

when a local variable shares the same name as a global variable. Python cannot access the global variable because the local variable will be found first

86
Q

scope

A

range of statements in the code where the variables can be accessed

87
Q

accumulator pattern

A

the action of incrementing a variable through an interation

88
Q

accumulator

A

the variable that is modified in an accumulator pattern loop

89
Q

functional decomposition

A

the action of taking a problem and breaking it apart into smaller subproblem

90
Q

generalization

A

problem-solving technique: see pattern and relationship to simplify a solution: a square is just a type of rectangle

91
Q

block

A

a groups of consecutive statements with the same indentation

92
Q

body

A

the block of statements in a compound statement that follows the header

93
Q

boolean expression

A

an expression that is either True or False

94
Q

boolean function

A

a function that returns True or False. The only possible values of the bool type are False and True.

95
Q

boolean value

A

There are exactly two boolean values: True and False. Boolean values result when a boolean expression is evaluated by the Python interpreter. They have type bool.

96
Q

branch

A

one of the possible paths of the flow of execution determined by the conditional execution

97
Q

chained conditional

A

a condition branch with more than two possible flows of execution. In Python, chained conditionals are written with if….elif….else statements

98
Q

comparison operator

A

one of the operators that compare two values: ==, >=,

99
Q

condition

A

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

100
Q

conditional statement

A

a statement that controls the execution depending on some condition. In Python the keywords if, elif and else are used for conditional statements.

101
Q

logical operators

A

one of the operators that combines two boolean expressions: and or not

102
Q

modulus operator

A

an operator, denoted with the percent sign (%) that works on integers and yields the remainder of one number divided by another

103
Q

nesting

A

one program structure within another; such as a conditional statement inside the branch of another conditional

104
Q

Boolean Algebra

A

The basis of all computer mathematics. Created by George Boole

105
Q

another name for conditional statement

A

selection statement

106
Q

another name for if statement

A

binary statement (only True / False)

107
Q

unary selection

A

omitting the else clause in the if compound statement

108
Q

algorithm

A

a step-by-step process for solving a category of problems

109
Q

body

A

statements inside of a compound statement, like a loop

110
Q

counter

A

a variable used to count something, usually initialized to zero and incremented in the body of a loop

111
Q

cursor

A

an invisible marker that keeps track of where the next character will be written

112
Q

definitive iteration

A

a loop for which an upper bound for the iteration of the body is known. usually coded with a for loop

113
Q

escape sequence

A

the escape character, \, followed by a printable character that denotes a non-printable character

114
Q

generalize

A

to replace a constant with a variable or parameter. Generalization makes code more versatile, more likely to be re-used and, sometimes, easier to write.

115
Q

infinite loop

A

a loop whose terminating condition is never satisfied

116
Q

indefinite loop

A

a loop whose upper bound is not pre-determined. coded with a while loop

117
Q

iteration

A

repeated executions of the body of the loop

118
Q

loop

A

a set of statements that is repeated until the terminating condition is reached

119
Q

loop variable

A

a variable used as part of a loop as part of the terminating condition

120
Q

nested loop

A

a loop inside the body of a loop

121
Q

newline

A

an escape character that moves the cursor to a new line

122
Q

reassignment

A

making more than one assignment to a variable in the course of the program

123
Q

tab

A

an escape character that moves the cursor to the next tab stop

124
Q

collection data type

A

a data type in which the values are made up of components, or elements, that are themselves values (str)

125
Q

default value

A

the value given to an optional parameter if no argument is passed to it during the function call

126
Q

dot notation

A

use of the dot to access functions inside modules or to access methods and attributes of objects

127
Q

immutable

A

a compound data type whose elements cannot be assigned new values

128
Q

index

A

a variable or value used to select a member of an ordered collection, such as a character from a string or an element from a list

129
Q

optional parameter

A

a parameter in the function header which is assigned a value that will be used if no other value is passed to it via an argument in the function call

130
Q

slice

A

part of a string (substring) specified by a range of indices. More generally, any subsequence of any sequence type in Python can be created using the slice operators

131
Q

traverse

A

to iterate through the elements of a collection, performing a similar operation on each

132
Q

whitespace

A

any of the characters that move the cursor without printing visible characters. The constant string.whitespace contains all the white-space characters

133
Q

string (collection definition)

A

sequential collection of characters

134
Q

lexicographical order

A

similar to alphabetical order, but all uppercase letters come before lowercase letters

135
Q

ordinal value

A

unique identifier number for characters in Python

136
Q

iteration by item

A

sequence iteration where the loop variable is automatically reassigned to each character in the string

137
Q

id

A

Unique identifier for objects corresponding to an address in memory

138
Q

aliases

A

multiple variables that contain references to the same object

139
Q

clone

A

to create a new object that has the same value as an existing object. Copying a reference to an object creates an alias but doesn’t clone the object

140
Q

delimiter

A

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

141
Q

element

A

one of the values in a list (or sequence). The bracket operator selects element of a list.

142
Q

index

A

an integer, variable or value that indicates an element of a list (or char in a str)

143
Q

list

A

a collection of objects, where each object is identified by an index. Like other types (str, int, float), there is a list type-converter function that tries to turn its argument into a list.

144
Q

list traversal

A

the sequential accessing of each element in a list

145
Q

modifier

A

a function which changes its arguments inside the function body. Only mutable types can be changed by modifiers.

146
Q

mutable data type

A

a data type in which the elements may be modified. All mutable types are compound types. Lists is a mutable data type; string is not.

147
Q

nested list

A

a list that is an element of another list

148
Q

object

A

a thing to which a variable can refer

149
Q

pattern

A

a sequence of statements, or a style of coding something that has general applicability in a number of different situations. Part of becoming a mature Computer Scientist is to learn and establish the algorithms that form your toolkit. Patterns often correspond to your “mental chunking.”

150
Q

pure function

A

a function which has no side effects. Pure function only change the calling function through their return value

151
Q

sequence

A

any of the data types that consist of an ordered collection of elements, with each element identified by an index

152
Q

side effect

A

a change in the state of a program made by calling a function that is not a result of reading the return value from the function. Side effects can only be produced by modifiers.

153
Q

tuple

A

a sequential collection of items, similar to a list. Any python object can be an element of a tuple. However, unlike a list, tuples are immutable

154
Q

item assignment

A

assignment to an element of a list

155
Q

functional programming style

A

using pure functions wherever possible and modifiers where appropriate

156
Q

dictionary

A

collection of key-value pairs that maps from keys to values. keys can be any immutable type and values can be any type

157
Q

key

A

a data item mapped to a value in the dictionary. keys are used to look up a value in a dictionary.

158
Q

key-value pair

A

one of the pair of items in a dictionary. values are looked up in a dictionary by key

159
Q

mapping type

A

a data type composed of a collection of keys with associated values. dictionaries are python’s only built-in mapping type and use the associative array abstract data type

160
Q

abstract data type

A

a mathematical model for data types where a data type is defined by its behavior (semantics) from the point of view of a user of the data, specifically in terms of possible values, possible operations on data of this type, and the behavior of these operations

161
Q

attribute

A

one of the named data items that makes up an instance

162
Q

class

A

user-defined compound type. can be thought of as a template for the objects that are instances of it

163
Q

constructor

A

every class has a factory, called by the same name as the class, for making new instances. If the class has an “initializer method” this method is used to set the attributes to their initial states

164
Q

initializer method

A

a special method named __init__ that is automatically invoked to set a newly-created object’s attributes to their initial state

165
Q

instance

A

an object whose type is some type of class. Object and instance are used interchangeably

166
Q

instantiate

A

to create an instance of a class and run its initializer method

167
Q

method

A

a function that is defined inside a class definition and is invoked on instances of the class

168
Q

object (from class)

A

a compound data type that is often used to model a thing or concept in the real world. It bundles together the data and operations that are relevant for that kind of data.

169
Q

object-oriented programming

A

a powerful programming paradigm in which data and the operations that manipulate it are organized into classes and methods