Chapter 4 Data Flashcards

1
Q

Where does Data Structures come from?

A

data comes from a file stored on a hard disk

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

What does Iterate mean?

A

To go through a line of code

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

What kind a statement is this “result_f = open(“results.txt”)”

A

Open the file and give it a file handle

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

What does this mean open()

A

file handle

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

What do you call when you read one line at a time

A

For Loop

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

Each time the body of the for loop runs what happens

A

variable is set to a string containing the current line of text in the file. This is referred to as iterating
through the data in the file

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

What does this mean result_f.close()

A

Close the file

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

What does split() method mean?

A

cuts the string

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