Question
Objective: To work with dictionaries in Python Assignment: Create a menu showing the details as below: 1. Create Employee Details 2. Display the Employee Details
Objective: To work with dictionaries in Python
Assignment: Create a menu showing the details as below:
1. Create Employee Details
2. Display the Employee Details
3. Update the dictionary
4. Sort the dictionary based on key
5. Exit
For option 1, you may need to store the Employee details such as Employee Id and Employee Name as a dictionary called emp by means of user input values. For example, {101:Jack, 102:Sam, }. For option 2, Display the current contents of the Dictionary emp. For option 3, Update the emp dictionary whose key is 101 and change the Employee Name as John Samuel. Verify the content of the dictionary. For option 4, Sort the emp dictionary by means of its key, Employee ID. Display the sorted dictionary by Employee ID For option 5, Exit from the program. Only option to exit from the program, is through option 5.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started