Chapter 7 Flashcards

1
Q

compound data type

A

A data type in which the values are made up of components, or elements, that are themselves values.

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

default value

A

The value given to an optional parameter if no argument for it is provided in the function call.

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

docstring

A

A string constant on the first line of a function or module definition (and as we will see later, in class and method definitions as well). Docstrings provide a convenient way to associate documentation with code. Docstrings are also used by the doctest module for automated testing.

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

dot notation

A

Use of the dot operator, ., to access functions inside a module.

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

immutable

A

A compound data type whose elements cannot be assigned new values.

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

index

A

A variable or value used to select a member of an ordered set, such as a character from a string.

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

optional parameter

A

A parameter written in a function header with an assignment to a default value which it will receive if no corresponding argument is given for it in the function call.

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

slice

A

A part of a string (substring) specified by a range of indices. More generally, a subsequence of any sequence type in Python can be created using the slice operator (sequence[start:stop]).

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

traverse

A

To iterate through the elements of a set, performing a similar operation on each.

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

whitespace

A

Any of the characters that move the cursor without printing visible characters. The constant string.whitespace contains all the white-space characters.

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