- Home
- Studylists
Class - 12 CBSE Computer Science — Assertion Reason Type Questions
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.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
View Answer1 Likes
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.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
View Answer1 Likes
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.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
View Answer1 Likes
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.
View Answer1 Likes
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.
View Answer3 Likes
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.
View Answer2 Likes
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.
View Answer3 Likes
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.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
View Answer3 Likes
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.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
View Answer2 Likes
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.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
View Answer2 Likes