Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part 1 Call a function that will display a heading and menu choices for the user. The information to display is found in the sample
Part
Call a function that will display a heading and menu choices for the user. The information to display is found in the sample screenshot.
Part
Call a function that will prepopulate a dictionary that will hold country key and name. A minimum of three countries must be in the original dictionary.
Part
Use the menu commands to perform the following functionality:
Call a function to view a country. Display all the keys in the dictionary using a for. in loop. The user will then enter a key and display the corresponding country. If the user enters an invalid key display a message. Use the dictionary as a parameter passed into the function.
Call a function to add a country to the dictionary. If the user enters a key value that already exists display a message. Use the dictionary as a parameter passed into the function.
Call a function to delete a title from the dictionary. If the user enters an invalid key value display a message. Use the dictionary as a parameter passed into the function.
Exit the program.
If the user entered an invalid command display a message.
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