Data Types Conceptual Questions
Questions
Conceptual
str literals in Python can be surrounded in either single-quote characters ('like this') or double-quote characters ("like this"), though in COMP110 we prefer the double-quotes. (T/F)
TRUE and FALSE are valid bool values in Python. (T/F)
- An
int literal can begin with a zero, but cannot end with a zero. (T/F)
- What function can we use to identify the type classification of any object in Python?
- What is a
bool data type in Python?
- Data type for storing text
- Data type for storing whole numbers such as -10, 3, or 100
- Data type for storing True/False values
- Data type for storing any type of information
- Data type for storing numbers with a decimal point such as 1.0, 3.14, or -0.1
- What is an
int data type in Python?
- Data type for storing text
- Data type for storing whole numbers such as -10, 3, or 100
- Data type for storing True/False values
- Data type for storing any type of information
- Data type for storing numbers with a decimal point such as 1.0, 3.14, or -0.1
- What is a
str data type in Python?
- Data type for storing text
- Data type for storing whole numbers such as -10, 3, or 100
- Data type for storing True/False values
- Data type for storing any type of information
- Data type for storing numbers with a decimal point such as 1.0, 3.14, or -0.1
- An
int literal can begin with any number of zeroes. (T/F)
- Which of the following literals are a
float?
4
"4"
4.0
"4.0"
- What function can you use to determine the type of an object in Python?
print()
str()
len()
type()
Solutions
Solutions
Conceptual Solutions
- True
- False
- False
type()
- C
- B
- A
- False
- C
- D
Contributor(s): Alyssa Lytle, Megan Zhang, David Karash, Benjamin Eldridge