Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as

(a) Both A and R are true and R is the correct explanation for A

(b) Both A and R are true and R is not the correct explanation for A

(c) A is True but R is False

(d) A is false but R is True

 

Assertion(A): Tuple is an immutable data type 

Reasoning (R): An immutable data type cannot be modified after it is created. 

Answer:

Answer by student

a) Both A and R are true and R is the correct explanation for A.

Detailed answer by teachoo

-lock-

A tuple is an ordered and immutable collection of elements. Once a tuple is created, its elements cannot be modified, added, or removed. An immutable data type is a data type that cannot be changed after it is created.

Let’s see why the assertion and the reasoning are true and how they are related.

Assertion(A): Tuple is an immutable data type. This statement is TRUE , because it is the definition of a tuple. A tuple is an immutable data type that cannot be modified after it is created.

Reasoning (R): An immutable data type cannot be modified after it is created. This statement is TRUE , because it is the definition of an immutable data type. An immutable data type cannot be changed after it is created.

The reasoning R is the correct explanation for the assertion A, because it gives the general property of an immutable data type, which applies to a tuple as well. A tuple is an example of an immutable data type, so it inherits the property of not being modifiable after creation.

So, the correct answer is a) Both A and R are true and R is the correct explanation for A.

-endlock-

Remove Ads Share on WhatsApp
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh is an IIT Kanpur graduate and has been teaching for 16+ years. At Teachoo, he breaks down Maths, Science and Computer Science into simple steps so students understand concepts deeply and score with confidence.

Many students prefer Teachoo Black for a smooth, ad-free learning experience.