CBSE Class 11 Informatics Practices Question 5 of 62

Getting Started with Python — Question 5

Back to all questions
5
Question

Question 5

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

Reasoning (R): Python interpreter assigns variables a data type at runtime based on the variable's value at that time.

  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
Python is a dynamically typed language because variables do not need to be declared with a specific type. Instead, the type of a variable is determined at runtime based on the value assigned to it.