Computational Thinking and Programming-I Quiz 3

πŸ”’ Computational Thinking & Programming-I Quiz 3 β€” Python Data Types (Class 11 CS)

Practice 20 CBSE Class 11 Computer Science (Code 083) MCQs on Python data types β€” numbers (integer, float, complex), boolean, sequences (string, list, tuple), None, mapping (dictionary), and mutable vs immutable data types.

Every type() output and expression result below has been verified by actually running it in Python. Tap any question to reveal the answer with a clear explanation.

πŸ”’ Data TypesπŸ“œ SequencesπŸ”“ Mutabilityβœ… BooleanπŸ” type()πŸ—‚οΈ MappingπŸ” Type Conversion
Q1
πŸ”’ Data Types

Which of the following is a numeric data type in Python?

  1. String
  2. List
  3. Integer
  4. Dictionary
Show Answer & Explanation

βœ… Answer: (c) Integer

Integer is a numeric data type in Python, used to represent whole numbers. String, List, and Dictionary all hold non-numeric or mixed data.

Q2
πŸ”’ Data Types

What is the data type of 3.14 in Python?

  1. Integer
  2. Floating point
  3. Complex
  4. Boolean
Show Answer & Explanation

βœ… Answer: (b) Floating point

3.14 has a decimal point, which makes it a floating point number in Python β€” confirmed by type(3.14) returning <class 'float'>.

Q3
πŸ“œ Sequences

Which of the following is a sequence data type in Python?

  1. None
  2. Dictionary
  3. Tuple
  4. Boolean
Show Answer & Explanation

βœ… Answer: (c) Tuple

A tuple is an ordered sequence of elements, just like lists and strings. None, Dictionary, and Boolean are not sequence types.

Q4
πŸ”“ Mutability

Which data type is used to represent a collection of elements that can be modified in Python?

  1. Immutable
  2. Boolean
  3. Mutable
  4. Integer
Show Answer & Explanation

βœ… Answer: (c) Mutable

Mutable data types (like lists, dictionaries, and sets) allow their contents to be changed after creation β€” elements can be added, removed, or updated in place.

Q5
πŸ”“ Mutability

Which data type is used to represent a collection of elements that cannot be modified in Python?

  1. Mutable
  2. Float
  3. Complex
  4. Immutable
Show Answer & Explanation

βœ… Answer: (d) Immutable

Immutable data types (like tuples and strings) cannot be changed once created β€” any β€œmodification” actually creates a brand-new object instead.

Q6
βœ… Boolean

What is the value of the expression 5 > 3 in Python?

  1. True
  2. False
  3. None
  4. Error
Show Answer & Explanation

βœ… Answer: (a) True

5 is indeed greater than 3, so this comparison evaluates to the boolean True.

Q7
πŸ”’ Data Types

Which data type is used to represent a single character or a sequence of characters in Python?

  1. Integer
  2. Boolean
  3. String
  4. List
Show Answer & Explanation

βœ… Answer: (c) String

A string represents text β€” either a single character or a whole sequence of characters, enclosed in quotes.

Q8
πŸ” type()

What is the value of the expression type(42) in Python?

  1. Integer
  2. Float
  3. String
  4. Boolean
Show Answer & Explanation

βœ… Answer: (a) Integer

type(42) returns <class 'int'>, meaning 42 is an Integer.

Q9
πŸ” type()

What is the value of the expression type([1, 2, 3]) in Python?

  1. Integer
  2. Float
  3. List
  4. Boolean
Show Answer & Explanation

βœ… Answer: (c) List

Square brackets [ ] define a list in Python, so type([1, 2, 3]) returns <class 'list'> β€” List.

Q10
πŸ—‚οΈ Mapping

Which data type is used to represent key-value pairs in Python?

  1. Boolean
  2. List
  3. Tuple
  4. Dictionary
Show Answer & Explanation

βœ… Answer: (d) Dictionary

A dictionary stores data as key-value pairs, letting you look up a value quickly using its associated key β€” e.g. {"name": "Riya"}.

Q11
πŸ” type()

What is the data type of the value None in Python?

  1. Integer
  2. String
  3. Boolean
  4. NoneType
Show Answer & Explanation

βœ… Answer: (d) NoneType

None is a special built-in value representing β€œnothing” or β€œno value”, and its type is its own unique class: NoneType.

Q12
πŸ—‚οΈ Mapping

Which data type represents an unordered collection of key-value pairs in Python?

  1. List
  2. Tuple
  3. Dictionary
  4. String
Show Answer & Explanation

βœ… Answer: (c) Dictionary

A dictionary is Python’s built-in mapping type β€” an unordered (prior to Python 3.7, and insertion-ordered since) collection of key-value pairs.

Q13
πŸ”“ Mutability

Which of the following data types in Python is mutable?

  1. Tuple
  2. Dictionary
  3. String
  4. Integer
Show Answer & Explanation

βœ… Answer: (b) Dictionary

A dictionary is mutable β€” you can add, remove, or update key-value pairs after it’s created. Tuples, strings, and integers are all immutable.

Q14
πŸ”’ Data Types

What is the value of the expression 3 + 4j in Python?

  1. Integer
  2. String
  3. Complex
  4. Boolean
Show Answer & Explanation

βœ… Answer: (c) Complex

The j suffix marks the imaginary part of a number in Python, making 3 + 4j a Complex number β€” confirmed by type(3 + 4j) returning <class 'complex'>.

Q15
βœ… Boolean

Which of the following is an actual boolean value in Python (not just text that looks like one)?

  1. “True”
  2. 1
  3. True
  4. 0
Show Answer & Explanation

βœ… Answer: (c) True

True (without quotes) is the real boolean literal in Python. "True" is just a string that happens to say True, while 1 and 0 are integers β€” even though Python treats them as β€œtruthy” and β€œfalsy” in conditions, their actual type is int, not bool.

Q16
πŸ” type()

What is the value of the expression type(“Hello”) in Python?

  1. List
  2. Integer
  3. String
  4. Tuple
Show Answer & Explanation

βœ… Answer: (c) String

Text enclosed in quotes is always a string in Python, so type("Hello") returns <class 'str'> β€” String.

Q17
πŸ” type()

What is the value of the expression type((1, 2, 3)) in Python?

  1. List
  2. Tuple
  3. Set
  4. Dictionary
Show Answer & Explanation

βœ… Answer: (b) Tuple

Round brackets ( ) with comma-separated values define a tuple, so type((1, 2, 3)) returns <class 'tuple'> β€” Tuple.

Q18
πŸ” Type Conversion

Which built-in function converts a value to an integer in Python?

  1. str()
  2. int()
  3. float()
  4. bool()
Show Answer & Explanation

βœ… Answer: (b) int()

int() is the built-in function used to convert a compatible value (like a numeric string or a float) into an integer β€” for example, int("5") gives 5.

Q19
πŸ”“ Mutability

Which of the following data types is immutable in Python?

  1. List
  2. Dictionary
  3. Set
  4. Tuple
Show Answer & Explanation

βœ… Answer: (d) Tuple

A tuple is immutable β€” trying to change an element (e.g. t[0] = 5) raises a TypeError. List, dictionary, and set are all mutable and can be changed after creation.

Q20
πŸ” type()

What is the value of the expression type(True) in Python?

  1. Integer
  2. Boolean
  3. String
  4. NoneType
Show Answer & Explanation

βœ… Answer: (b) Boolean

type(True) returns <class 'bool'> β€” Boolean. (Interesting fact: bool is technically a subclass of int in Python, which is why True == 1 evaluates to True β€” but type() still correctly reports it as bool.)

Jitendra Singh
βœ” Verified Educator

Jitendra Singh

Founder of CBSEPython.in

I help CBSE Class 9–12 students learn Python, Information Technology, Artificial Intelligence and Computer Science through easy notes, quizzes, MCQs and sample papers.

Read More About Me β†’