- Home
- Studylists
Class - 12 CBSE Computer Science — Assertion Reason Type Questions
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.
- 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 Funda
Assertion. """A Sample Python String""" is a valid Python String.
Reason. Triple Quotation marks are not valid in Python.
View Answer2 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 Answer3 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 Answer2 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 Answer2 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.
- 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 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.
- 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 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.
- Both A and R are true, and R is the correct explanation of A.
- Both A and R are true, and 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 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.
View Answer2 Likes
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 Answer1 Likes