py4e chapter 4 Flashcards

1
Q

Algorithm

A

a general process for solving a category of problems

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

Argument

A

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

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

Composition

A

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

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

Deterministic

A

Pertaining to a program that does the same thing each time it runs, given the same inputs.

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

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

Flow of execution

A

The order in which statements are executed during a program run.

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

Function call

A

A statement that executes a function, it consists of the function name followed by an argument list.

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

Function Definition

A

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

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

Header

A

the fist line of a function definition.

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

Import Statement

A

A statement created 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 data and code defined in a module.

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

Parameter

A

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

17
Q

pseudorandom

A

Pertaining to a sequence of numbers that appear to be random, but are generated by a deterministic program.

18
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

19
Q

Void function

A

A function that does not return a value.