Loading

Quipoin Menu

Learn • Practice • Grow

python / Basic Data Types
mcq
Direction: Choose the correct option

Q1.

Which of the following is a built-in numeric data type in Python?
A. complex
B. All of the above
C. float
D. int
Direction: Choose the correct option

Q2.

What is the result of `type(3.14)`?
A. <class 'int'>
B. <class 'float'>
C. <class 'complex'>
D. <class 'decimal'>
Direction: Choose the correct option

Q3.

Which data type is immutable in Python?
A. tuple
B. dict
C. list
D. set
Direction: Choose the correct option

Q4.

What does `bool(0)` return?
A. Error
C. FALSE
D. TRUE
Direction: Choose the correct option

Q5.

How do you convert a string to a list of characters?
A. list('hello')
B. str('hello')
C. 'hello'.split()
D. tuple('hello')
Direction: Choose the correct option

Q6.

What is the data type of `(1, 2, 3)`?
A. tuple
B. dictionary
C. list
D. set
Direction: Choose the correct option

Q7.

Which of the following is a valid way to create an empty set?
A. {}
B. ()
C. set()
D. []
Direction: Choose the correct option

Q8.

What is the result of `type(10 // 3)`?
A. <class 'bool'>
B. <class 'int'>
C. <class 'float'>
D. <class 'complex'>
Direction: Choose the correct option

Q9.

What does `isinstance('hello', str)` return?
A. TRUE
B. Error
C. FALSE
Direction: Choose the correct option

Q10.

Which of the following is NOT a valid Python data type?
A. tuple
B. array
C. list
D. dict