6 Storing data in dictionaries Flashcards

1
Q

Julia as a Second Language

What is the operator used to create a dictionary pair?

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

Julia as a Second Language

What method can be used to pull up the keyword for a dictionary pair?

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

Julia as a Second Language

What method can be used to pull up the value for a dictionary pair?

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

Julia as a Second Language

What method allows you to look at the fields for a value?

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

Julia as a Second Language

What does dump() do?

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

Julia as a Second Language

What is the keyword used to create a dictionary, and how is the dictionary created with it?

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

Julia as a Second Language

What is an comprehension?

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

Julia as a Second Language

How can you create a comprehension that makes a dictionary?

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

Julia as a Second Language

What does collect() do?

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

Julia as a Second Language

How can you create a simple array using collect(), enumerate(), and a range?

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

Julia as a Second Language

How do you create a dictionary using the dictionary keyword, not using the keyword, and by using an array of tuples?

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

Julia as a Second Language

How can you create a dictionary and specify the types of the keys and the values?

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

Julia as a Second Language

How can you easily combined two arrays of the same length into one array of tupe pairs (each tuple having one element from each of the original arrays)?

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

Julia as a Second Language

How can you easily combined two arrays of the same length into a single dictionary with one of the arrays making up the keys and the other making up the values?

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

Julia as a Second Language

What is a sentinel value?

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

Julia as a Second Language

When using dictionaries, how do prevent getting an error message when you are not sure if a key exist?

17
Q

Julia as a Second Language

When might an array with key / values pairs be faster than a dictionary?

18
Q

Julia as a Second Language

How do you create a named tuple?

19
Q

Julia as a Second Language

What are the two ways to call up a value of a named tuple?

20
Q

Julia as a Second Language

What is the advantage of a named tuple?