KnowledgeBoat Logo

Class - 12 CBSE Computer Science — Assertion Reason Type Questions

  • Python Exception Handling

    Assertion (A): Exception handling code is separate from normal code.

    Reasoning (R): Program logic is different while exception handling code uses specific keywords to handle exceptions.

    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 Exception Handling

    Assertion (A): Exception handling code is clear and block based in Python.

    Reasoning (R): The code where unexpected runtime exception may occur is separate from the code where the action takes place when an exception occurs.

    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 Exception Handling

    Assertion (A): No matter what exception occurs, you can always make sure that some common action takes place for all types of exceptions.

    Reasoning (R): The finally block contains the code that must execute.

    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.


  • Linear Lists

    Assertion. A linear list refers to a named list of finite number of similar data elements.

    Reason. Similar type of elements grouped under one name make a linear list.


  • Linear Lists

    Assertion. A list having one or more lists as its elements is called a nested list.

    Reason. Two or more lists as part of another data structure such as dictionaries or tuples, create nested lists.


  • Linear Lists

    Assertion. A list having same-sized lists as its elements is a regular 2D list.

    Reason. When similar sequences such as tuples, dictionaries and lists become part of another data structure, they make a regular 2D list.


  • Linear Lists

    Assertion. A list having lists as its elements with elements being different-shaped make a ragged 2D list.

    Reason. A list having different-sized lists as its elements make an irregular 2D list.


  • Python Stack

    Assertion (A): The major implementation of using a data structure is to manage the storage of data in the memory efficiently.

    Reasoning (R): Data structure refers to the way memory is allocated for holding data using minimum space. It leads to faster data access during the execution of the program.

    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 Stack

    Assertion (A): While working with Stacks, the program should check for Overflow condition before executing push operation and, similarly, check for Underflow before executing pop operation.

    Reasoning (R): In Stack, Underflow means there is no element available to remove and Overflow means no further element can be added 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.


  • Python Stack

    Assertion (A): Stack is a memory structure that works on the principle of FIFO (First In, First Out).

    Reasoning (R): Stack is implemented using list and allows to add an element using append() method.

    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.


Showing 61 - 70 of 201 Questions