Python Data Types Flashcards

1
Q

Name the Text data types:

A

str

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

Name the Numeric data types:

A

int, float, complex

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

Name the Sequence data types:

A

list, tuple, range

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

Name the Mapping data types:

A

dict

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

Name the Set data types:

A

set, frozenset

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

Name the Boolean data types:

A

bool

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

Name the Binary data types:

A

bytes, bytearray, memoryview

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

What is the ‘int’ data type?

A

Int, or integer, represents positive or negative numbers without decimals.

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

What is the ‘float’ data type?

A

Positive or negative number containing one or more decimals.

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

What is the ‘complex’ data type?

A

Numbers written with a ‘j’ as the imaginary part

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

Does python have a random() function?

A

No

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

How do you create random numbers in Python?

A

Import ‘random’ module

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