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
syntax error
An error in a program that makes it impossible to parse — and therefore impossible to interpret.
26
token
One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language.
27
assignment operator
= is Python’s assignment operator, which should not be confused with the mathematical comparison operator using the same symbol.
28
assignment statement
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
29
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.
30
composition
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
31
composition
The ability to combine simple expressions and statements into compound statements and expressions in order to represent complex computations concisely.
32
concatenate
To join two strings end-to-end.
33
data type
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).
34
evaluate
To simplify an expression by performing the operations in order to yield a single value.
35
expression
A combination of variables, operators, and values that represents a single result value.
36
float
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.
37
int
A Python data type that holds positive and negative whole numbers.
38
integer division
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.
39
keyword
A reserved word that is used by the compiler to parse program; you cannot use keywords like if, def, and while as variable names.
40
operand
One of the values on which an operator operates.
41
operator
A special symbol that represents a simple computation like addition, multiplication, or string concatenation.
42
rules of precedence
The set of rules governing the order in which expressions involving multiple operators and operands are evaluated.
43
state diagram
A graphical representation of a set of variables and the values to which they refer.
44
statement
An instruction that the Python interpreter can execute. Examples of statements include the assignment statement and the print statement.
45
str
A Python data type that holds a string of characters.
46
value
A number or string (or other things to be named later) that can be stored in a variable or computed in an expression.
47
variable
A name that refers to a value.
48
variable name
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.
49
attribute
state or value that belongs to a particular object. for example, slim (turtle) has a color.
50
canvas
a surface within a window where drawing takes place
51
for loop
a statement in python for convenient repetition of statements in the body of the loop
52
instance
an object that belongs to a class. slim and cujo are instances of the the class Turtle in the module turtle
53
invoke
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
54
iteration
basic building blocks for algorithms. allows steps to be repeated. sometimes called looping. repeated execution of a sequence of statements
55
loop body
statements nested (indented) inside of a loop
56
loop variable
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
57
method
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)
58
module
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
59
object
a "thing" to which a variable can refer; e.g. slim = turtle.Turtle(). slim is object (and variable?!)
60
range
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)
61
sequential
the default behavior of a program; line-by-line processing of the algorithm
62
state
the collection of attribute values that a specific data object maintains
63
state
the collection of attribute values that a specific data object maintains
64
terminating condition
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
65
Turtle
a data object used to create pictures (called turtle graphics)
66
deterministic
a process that is repeatable and predictable
67
documentation
a place where you can go to get information about the programming language
68
pseudo-random number
a number that is not genuinely random but is generated algorithmically
69
standard library
a collection of modules included in the normal Python installation
70
function
a named sequence of statements that belong together
71
compound statement
header line and body...the for statement and functions
72
chatterbox function
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
composition (of functions)
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
dead code
part of the program that never gets executed, often because it appears after the return statement
75
fruitful function
a function that yields a return value instead of None
76
incremental development
A program development plan intended to simplify debugging by adding and testing only a small amount of code at a time
77
None
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
return value
the value provided as a result of a function call
79
scaffolding
code that is used during program development to assist with development and debugging. doctests is one example
80
temporary variable
a variable used to store an intermediate value in a complex calculation. created via an assignment statement in a function
81
function call
also referred to as function invocation. name of the function followed by the arguments (assigned to parameters in the function definition).
82
lifetime
the time during which a local variable exists
83
local scope
the range of statements within a function that represent where the local variables can be accessed
84
global scope
the range of statements globally that represent where the local variables can be accessed
85
shadowing
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
scope
range of statements in the code where the variables can be accessed
87
accumulator pattern
the action of incrementing a variable through an interation
88
accumulator
the variable that is modified in an accumulator pattern loop
89
functional decomposition
the action of taking a problem and breaking it apart into smaller subproblem
90
generalization
problem-solving technique: see pattern and relationship to simplify a solution: a square is just a type of rectangle
91
block
a groups of consecutive statements with the same indentation
92
body
the block of statements in a compound statement that follows the header
93
boolean expression
an expression that is either True or False
94
boolean function
a function that returns True or False. The only possible values of the bool type are False and True.
95
boolean value
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
branch
one of the possible paths of the flow of execution determined by the conditional execution
97
chained conditional
a condition branch with more than two possible flows of execution. In Python, chained conditionals are written with if....elif....else statements
98
comparison operator
one of the operators that compare two values: ==, >=,
99
condition
the boolean expression in a conditional statement that determines which branch is executed
100
conditional statement
a statement that controls the execution depending on some condition. In Python the keywords if, elif and else are used for conditional statements.
101
logical operators
one of the operators that combines two boolean expressions: and or not
102
modulus operator
an operator, denoted with the percent sign (%) that works on integers and yields the remainder of one number divided by another
103
nesting
one program structure within another; such as a conditional statement inside the branch of another conditional
104
Boolean Algebra
The basis of all computer mathematics. Created by George Boole
105
another name for conditional statement
selection statement
106
another name for if statement
binary statement (only True / False)
107
unary selection
omitting the else clause in the if compound statement
108
algorithm
a step-by-step process for solving a category of problems
109
body
statements inside of a compound statement, like a loop
110
counter
a variable used to count something, usually initialized to zero and incremented in the body of a loop
111
cursor
an invisible marker that keeps track of where the next character will be written
112
definitive iteration
a loop for which an upper bound for the iteration of the body is known. usually coded with a for loop
113
escape sequence
the escape character, \, followed by a printable character that denotes a non-printable character
114
generalize
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
infinite loop
a loop whose terminating condition is never satisfied
116
indefinite loop
a loop whose upper bound is not pre-determined. coded with a while loop
117
iteration
repeated executions of the body of the loop
118
loop
a set of statements that is repeated until the terminating condition is reached
119
loop variable
a variable used as part of a loop as part of the terminating condition
120
nested loop
a loop inside the body of a loop
121
newline
an escape character that moves the cursor to a new line
122
reassignment
making more than one assignment to a variable in the course of the program
123
tab
an escape character that moves the cursor to the next tab stop
124
collection data type
a data type in which the values are made up of components, or elements, that are themselves values (str)
125
default value
the value given to an optional parameter if no argument is passed to it during the function call
126
dot notation
use of the dot to access functions inside modules or to access methods and attributes of objects
127
immutable
a compound data type whose elements cannot be assigned new values
128
index
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
optional parameter
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
slice
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
traverse
to iterate through the elements of a collection, performing a similar operation on each
132
whitespace
any of the characters that move the cursor without printing visible characters. The constant string.whitespace contains all the white-space characters
133
string (collection definition)
sequential collection of characters
134
lexicographical order
similar to alphabetical order, but all uppercase letters come before lowercase letters
135
ordinal value
unique identifier number for characters in Python
136
iteration by item
sequence iteration where the loop variable is automatically reassigned to each character in the string
137
id
Unique identifier for objects corresponding to an address in memory
138
aliases
multiple variables that contain references to the same object
139
clone
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
delimiter
a character or string used to indicate where the string should be split
141
element
one of the values in a list (or sequence). The bracket operator selects element of a list.
142
index
an integer, variable or value that indicates an element of a list (or char in a str)
143
list
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
list traversal
the sequential accessing of each element in a list
145
modifier
a function which changes its arguments inside the function body. Only mutable types can be changed by modifiers.
146
mutable data type
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
nested list
a list that is an element of another list
148
object
a thing to which a variable can refer
149
pattern
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
pure function
a function which has no side effects. Pure function only change the calling function through their return value
151
sequence
any of the data types that consist of an ordered collection of elements, with each element identified by an index
152
side effect
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
tuple
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
item assignment
assignment to an element of a list
155
functional programming style
using pure functions wherever possible and modifiers where appropriate
156
dictionary
collection of key-value pairs that maps from keys to values. keys can be any immutable type and values can be any type
157
key
a data item mapped to a value in the dictionary. keys are used to look up a value in a dictionary.
158
key-value pair
one of the pair of items in a dictionary. values are looked up in a dictionary by key
159
mapping type
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
abstract data type
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
attribute
one of the named data items that makes up an instance
162
class
user-defined compound type. can be thought of as a template for the objects that are instances of it
163
constructor
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
initializer method
a special method named __init__ that is automatically invoked to set a newly-created object's attributes to their initial state
165
instance
an object whose type is some type of class. Object and instance are used interchangeably
166
instantiate
to create an instance of a class and run its initializer method
167
method
a function that is defined inside a class definition and is invoked on instances of the class
168
object (from class)
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
object-oriented programming
a powerful programming paradigm in which data and the operations that manipulate it are organized into classes and methods