Chapter 6 Flashcards

1
Q

algorithm

A

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

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

body

A

The statements inside a loop.

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

counter

A

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

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

cursor

A

An invisible marker that keeps track of where the next character will be printed.

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

decrement

A

Decrease by 1.

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

development plan

A

A process for developing a program. In this chapter, we demonstrated a style of development based on developing code to do simple, specific things and then encapsulating and generalizing.

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

encapsulate

A

To divide a large complex program into components (like functions) and isolate the components from each other (by using local variables, for example).

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

escape sequence

A

An escape character, \, followed by one or more printable characters used to designate a nonprintable character.

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

generalize

A

To replace something unnecessarily specific (like a constant value) with something appropriately general (like a variable or parameter). Generalization makes code more versatile, more likely to be reused, and sometimes even easier to write.

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

increment

A

Both as a noun and as a verb, increment means to increase by 1.

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

infinite loop

A

A loop in which the terminating condition is never satisfied.

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

initialization (of a variable)

A

To initialize a variable is to give it an initial value, usually in the context of multiple assignment. Since in Python variables don’t exist until they are assigned values, they are initialized when they are created. In other programming languages this is not the case, and variables can be created without being initialized, in which case they have either default or garbage values.

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

iteration

A

Repeated execution of a set of programming statements.

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

loop

A

A statement or group of statements that execute repeatedly until a terminating condition is satisfied.

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

loop variable

A

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

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

multiple assignment

A

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

17
Q

newline

A

A special character that causes the cursor to move to the beginning of the next line.

18
Q

tab

A

A special character that causes the cursor to move to the next tab stop on the current line.

19
Q

trace

A

To follow the flow of execution of a program by hand, recording the change of state of the variables and any output produced.