Chapter 6 Flashcards

1
Q

Boolean function

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
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.

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

composition (of functions)

A

Calling one function from within the body of another, or using the return value of one function as an argument to the call of another.

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

dead code

A

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

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

fruitful function

A

A function that yields a return value instead of None.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
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.

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

return value

A

The value provided as the result of a function call.

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

scaffolding

A

Code that is used during program development to assist with development and debugging. The unit test code that we added in this chapter are examples of scaffolding.

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

temporary variable

A

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

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

test suite

A

A collection of tests for some code you have written.

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

unit testing

A

An automatic procedure used to validate that individual units of code are working properly. Having a test suite is extremely useful when somebody modifies or extends the code: it provides a safety net against going backwards by putting new bugs into previously working code. The term regression testing is often used to capture this idea that we don’t want to go backwards!

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