Page 392 - Computer Science Class 11 With Functions
P. 392
• Accepts a month name from a user and displays the corresponding number of days.
• Displays the names of months in alphabetical order.
10. Create a dictionary of employees with their Aadhar card numbers, names, and salaries. Write a menu driven program to
fetch the details of employees based on their Aadhar card number.
11. Write a program to do the following:
• Create a dictionary of employees id mapped to a list storing their name, department, and salary.
• Displays the id and name of employees having a salary greater than 50,000.
• Accepts the employee id from a user and displays the corresponding details of the employee.
• Displays the ids of employees in sorted order.
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): Dictionary is an unordered data type.
Reasoning (R): The key-value pairs in a dictionary are accessed using keys as indexes.
2. Assertion(A): Python does not allow modification of keys in a dictionary.
Reasoning (R): Keys are used to retrieve the corresponding key-value pairs in a dictionary.
Case Based Questions
1. Abhilasha wants to create a program for her younger sister who is learning spellings of each digit. She wants to create a
dictionary that stores a digit and its corresponding spelling as key-value pairs. So, the dictionary will have items as 1:"One",
2:"Two, 3:"Three", …, 9:"Nine". Further, she wants to develop a program to accept a number as input and then display the
spellings for its digits. For example, if the user enters 502, the output should be Five Zero Two
2. Sukrit is a programmer in an IT company. He has been assigned the task of creating a Python program that will accept the
name and date of birth of each employee as input and store name and date of birth as key-value pairs of a dictionary. Sukrit
wishes to display the data of the employees ordered with respect to their names arranged in alphabetical order. Help him
to complete the task.
Multiple Choice Questions
1. (c) 2. (a) 3. (b) 4. (c) 5. (b) 6. (c) 7. (c) 8. (d)
9. (b) 10. (c)
True or False
1. (F) 2. (F) 3. (F) 4. (T) 5. (F) 6. (T) 7. (F)
Fill in the blanks
1. 2 2. False 3. rollnoMarksDict.pop(4)
4. [12, 25, 32, 60, 78, 90] 5. 5 6. None
390 Touchpad Computer Science-XI

