Glossary Chpt 3 Flashcards

1
Q

function

A

A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result.

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

function definition

A

A statement that creates a new function, specifying its name, parameters, and the statements it contains.

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

function object

A

A value created by a function definition. The name of the function is a variable that refers to a function object.

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

header

A

The first line of a function definition.

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

body

A

The sequence of statements inside a function definition

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

parameter

A

A name used inside a function to refer to the value passed as an argument.

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

function call

A

A statement that runs a function. It consists of the function name followed
by an argument list in parentheses.

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

argument

A

A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function

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

local variable

A

A variable defined inside a function. A local variable can only be used inside its function.

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

return value

A

The result of a function. If a function call is used as an expression, the return
value is the value of the expression.

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

fruitful function

A

A function that returns a value

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

void function

A

A function that always returns None

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

module

A

A file that contains a collection of related functions and other definitions

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

import statement

A

A statement that reads a module file and creates a module object.

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

module object

A

A value created by an import statement that provides access to the values defined in a module.

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

dot notation

A

The syntax for calling a function in another module by specifying the module name followed by a dot (period) and the function name.

17
Q

composition

A

Using an expression as part of a larger expression, or a statement as part of
a larger statement.

18
Q

flow of execution

A

The order statements run in.

19
Q

stack diagram

A

A graphical representation of a stack of functions, their variables, and the values they refer to.

20
Q

frame

A

A box in a stack diagram that represents a function call. It contains the local variables and parameters of the function

21
Q

traceback

A

A list of the functions that are executing, printed when an exception occurs