CBSE Class 11 Computer Science Question 2 of 98

Python Programming Fundamentals — Question 2

Back to all questions
2
Question

Question 2

Assertion (A): Python is a dynamically typed language.

Reasoning (R): The data type of a variable is declared as per the type of value assigned to it.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.
Answer

Both A and R are true and R is the correct explanation of A.

Explanation
In Python, the data type of a variable is determined by the type of value assigned to it, and it can change if the value assigned to the variable changes. This behavior is known as dynamic typing, meaning the type of the variable is not fixed and is decided at runtime based on the assigned value. Hence, Python is a dynamically typed language.