Page 320 - Computer Science Class 11 Without Functions
P. 320
Assertion and Reasoning Based Questions
The following questions are assertion(A) and reasoning(R) based. Mark the correct choice as
a. Both A and R are true and R is the correct explanation of A
b. Both A and R are true and R is not the correct explanation of A
c. A is true but R is false
d. A is false but R is true
1. Assertion(A): Elements of a list can be accessed using indexes.
Reasoning (R): The list is a sequence data type, and the elements of a sequence data type can be accessed using indexes.
2. Assertion(A): In the case of linear search, the search key is sequentially compared with the elements of the list.
Reasoning (R): Linear search is only applicable to lists, not to tuples.
3. Assertion(A): The function call sorted(lst) yields a list sorted in ascending order.
Reasoning(R): The list is a mutable data type.
Case Based Questions
1. Pamela is learning about lists and tuples. She wants to create a list of integers taking inputs from the keyboard. Next, using
this list, she wants to create two tuples one with odd numbers and the other with even numbers. Assist her in writing a
program to finish the task.
2. Jim has been tasked with finding sponsors for the celebration on the occasion of Founder's Day of the school. He intends
to store the following information about each sponsor in the form of a list:
Sponsor Name - string
Sponsorship Amount - integer
Next, he wants to find out the total amount collected from the sponsors. Assist Jim in completing his task.
Multiple Choice Questions
1. (c) 2. (a) 3. (b) 4. (c) 5. (a) 6. (c) 7. (b)
True or False
1. (F) 2. (F) 3. (F) 4. (F) 5. (T) 6. (F) 7. (T) 8. (F)
9. (T) 10. (F)
Fill in the blanks
1. append() 2. mutable, immutable 3. sorted() 4. statistics
5. an error 6. [] 7. None 8. [(1, 2, 3)]
9. [1, 2, 3] 10. True 11. []
318 Touchpad Computer Science-XI

