Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Only in Python 5. Write a script that creates a dictionary of name-age pair. Add some entries to your dictionary. Add a menu to support
Only in Python
5. Write a script that creates a dictionary of name-age pair. Add some entries to your dictionary. Add a menu to support ADD, REMOVE, SERACH, AGE INCREASE, PRINT operations. The "Age Increase" option increases the age by 1 for all the entries in the dictionary. Test the four operations. Show testing screenshot. Running Example: {"John': 34, 'Amy:59. Bob: 26. 'Gorge': 60} Operations 1. Search 2. Add 3. Remove 4. Age Increase 5. Print Dictionary 6. Exit Select 1-5:1 Enter name to search: Bob Bob 26 Operations 1. Search 2. Add 3. Remove 4. Age Increase 5. Print Dictionary 6. Exit Select 1-5: 2 Enter name: Allen Enter age: 45 {"John': 34, 'Amy:59, Bob: 26, Gorge': 60, 'Allen': 45} Operations 1. Search 2. Add 3. Remove 4. Age Increase 5. Print Dictionary 6. Exit Select 1-5:3 Enter name: Amy {"John': 34, 'Bob' 26, Gorge': 60, 'Allen': 45} Operations 1. Search 2. Add Remove 4. Age Increase 5. Print Dictionary 6. Exit Select 1-5:4 {'John' 35, 'Bob' 26, "Gorge': 60, 'Allen': 45} Operations 1. Search 2. Add 3. Remove 4. Age Increase 5. Print Dictionary 6. Exit Select 1-5: 5 John 35 Bob 27 Gorge 61 Allen 46 Operations 1. Search 2. Add Remove 4. Age Increase Print Dictionary 6. Exit Select 1-5: 6 GoodbyeStep 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