Computer Science

Assertion (A): The data type of a variable is taken according to the type of value assigned to it.

Reasoning (R): Data types do not require initialization at the time of declaration. This process is described as Dynamic Typing.

  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.

Python Data Handling

1 Like

Answer

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

Explanation
In Python, we are not required to explicitly declare a variable with its type. Whenever we declare a variable with a value, Python automatically assigns the relevant data type to it based on the assigned value. This process is known as dynamic typing.

Answered By

2 Likes


Related Questions