Python Data Types Flashcards
1
Q
Name the Text data types:
A
str
2
Q
Name the Numeric data types:
A
int, float, complex
3
Q
Name the Sequence data types:
A
list, tuple, range
4
Q
Name the Mapping data types:
A
dict
5
Q
Name the Set data types:
A
set, frozenset
6
Q
Name the Boolean data types:
A
bool
7
Q
Name the Binary data types:
A
bytes, bytearray, memoryview
8
Q
What is the ‘int’ data type?
A
Int, or integer, represents positive or negative numbers without decimals.
9
Q
What is the ‘float’ data type?
A
Positive or negative number containing one or more decimals.
10
Q
What is the ‘complex’ data type?
A
Numbers written with a ‘j’ as the imaginary part
11
Q
Does python have a random() function?
A
No
12
Q
How do you create random numbers in Python?
A
Import ‘random’ module