Chapter 10 - Definitions Flashcards

1
Q

Define aliases

A

Multiple variables that contain references to the same object

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

Define clone

A

To create a new object that has the same value as an existing object. Copying a reference to an object creates an alias but doesn’t clone the object

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

Define delimiter

A

A character or string used to indicate where a string should be split

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

Define element

A

One of the values in a list (or other sequence). The bracket operator selects elements of a list.

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

Define index

A

An integer variable or value that indicates an element of a list

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

Define list

A

A collection of objects, where each object is identified by an index. Like other types str, int, float, etc. there is also a list type-converter function that tries to turn its argument into a list

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

Define list traversal

A

The sequential accessing of each element in a list

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

Define modifier

A

A function which changes its arguments inside the function body. Only mutable types can be changed by modifiers

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

Define mutable data type

A

A data type in which the elements can be modified. All mutable types are compound types. Lists are mutable data types; strings are not.

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

Define nested list

A

A list that is an element of another list

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

Define object

A

A thing to which a variable can refer

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

Define pattern

A

A sequence statements, or a style of coding something that has general applicability in a number of different situations. Part of the becoming a mature Computer Scientist is to learn and establish the patterns and algorithms that form your toolkit. Patterns often correspond to your “mental chunking”.

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

Define pure function

A

A function with no side effects. Pure functions only make changes to the calling program through their return values.

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

Define sequence

A

Any of the data types that consist of an ordered collection of elements

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

Define side effect

A

A change in the state of a program made by calling a function that is not a result of reading the return value from the function. Side effects can only be produced by modifiers

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

Define tuple

A

A sequential collection of items, similar to a list. Any python object can be an element of a tuple. However, unlike a list, tuples are immutable.