Python Data Types Overview Quiz
A 35-question quiz introducing Python’s core data types, covering numbers, strings, booleans, sequences, mappings, mutability concepts, and how Python treats values at a high level.
Question 1
What does the term 'data type' refer to in Python?
Question 2
Which statement about Python's typing system is correct?
Question 3
Which category best describes numbers, strings, and booleans in Python?
Question 4
What function is commonly used to check a value’s data type?
Question 5
Which data type represents truth values?
Question 6
Which of the following is a floating-point value?
Question 7
What data type is produced by the expression True + 1?
Question 8
Which of the following is a string literal?
Question 9
What type does input() return?
Question 10
Which operation is valid for two strings?
Question 11
Which data type is ordered and mutable?
Question 12
Which data type is ordered and immutable?
Question 13
Which type stores unique, unordered values?
Question 14
Which type represents key-value pairs?
Question 15
Which of the following is a mutable type?
Question 16
Which type always has hashable keys?
Question 17
What does an empty string evaluate to in a boolean context?
Question 18
Which values are considered False in Python?
Question 19
Which category describes types that cannot be changed after creation?
Question 20
What type results from combining two lists with +?
Question 21
What is printed by this code?
x = "hello"
print(type(x))Question 22
What does this produce?
nums = [1, 2, 3]
print(len(nums))Question 23
What is the output?
a = (1, 2, 3)
print(a[1])Question 24
What does this code print?
s = set([1, 1, 2])
print(s)Question 25
What is the type of None?
Question 26
Which data type is best suited for representing an unchanging sequence?
Question 27
Which category describes lists, dictionaries, and sets?
Question 28
Which type can store mixed data, including numbers and text?
Question 29
Which type preserves insertion order in modern Python versions?
Question 30
Which container type disallows duplicates?
Question 31
Which type typically uses integer indexes?
Question 32
What kind of type is a string?
Question 33
Which of the following is a valid dictionary key?
Question 34
Which data type often underlies the structure of booleans?
Question 35
Which type is a good choice for representing unordered mathematical collections?
