Chapter 4 Flashcards

1
Q

instance

A

a member of a set. the TurtleWorld in this chapter is a member of the set of TurtleWorlds.

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

loop

A

a part of a program that can execute repeatedly.

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

encapsulation

A

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

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

generalization

A

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

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

keyword argument

A

an argument that includes the name of the parameter as a “keyword”.

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

interface

A

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

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

refactoring

A

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

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

development plan

A

a process for writing programs.

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

docstring

A

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

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

precondition

A

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

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

postcondition

A

a requirement that should be satisfied by the function before it ends.

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