Class - 12 CBSE Computer Science — Assertion Reason Type Questions

  • Python Data Handling

    Assertion (A): Indexing refers to accessing elements of a sequence. Python offers two types of indexing, viz. positive or forward and negative or backward indexing.

    Reasoning (R): Both forward and backward indexing are implemented in all the sequences, which start with first (1st) index.

    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 Funda

    Assertion. """A Sample Python String""" is a valid Python String.

    Reason. Triple Quotation marks are not valid in Python.

    View Answer

    10 Likes


  • Python String Manipulation

    Assertion. Modifying a string creates another string internally but modifying a list does not create a new list.

    Reason. Strings store characters while lists can store any type of data.

    View Answer

    43 Likes


  • Python String Manipulation

    Assertion. Modifying a string creates another string internally but modifying a list does not create a new list.

    Reason. Strings are immutable types while lists are mutable types of python.

    View Answer

    10 Likes


  • Python List Manipulation

    Assertion. Lists and Tuples are similar sequence types of Python, yet they are two different data types.

    Reason. List sequences are mutable and Tuple sequences are immutable.

    View Answer

    10 Likes


  • Python Data Handling

    Assertion (A): There is no difference between a list and a tuple in Python.

    Reasoning (R): The list elements are enclosed within square brackets [] separated by commas and the tuple elements are enclosed within parentheses () separated by commas.

    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 Functions

    Assertion (A): Both max() and min() functions are implemented on lists as well as tuples in Python.

    Reasoning (R): The max() and min() functions return the highest and the lowest among a set of values stored in a list or tuple respectively.

    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 List Manipulation

    Assertion(A): List is an immutable data type.

    Reasoning(R): When an attempt is made to update the value of an immutable variable, the old variable is destroyed and a new variable is created by the same name in memory.

    1. Both A and R are true, and R is the correct explanation of A.
    2. Both A and R are true, and 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 Dictionaries

    Assertion. Dictionaries are mutable, hence its keys can be easily changed.

    Reason. Mutability means a value can be changed in place without having to create new storage for the changed value.


  • Python Dictionaries

    Assertion. Dictionaries are mutable but their keys are immutable.

    Reason. The values of a dictionary can change but keys of dictionary cannot be changed because through them data is hashed.

    View Answer

    62 Likes


Showing 11 - 20 of 201 Questions