I need the py file and output file. Run all menu options and show input validation. Thank
Fantastic news! We've Found the answer you've been seeking!
Question:
I need the py file and output file. Run all menu options and show input validation. Thank you.
Transcribed Image Text:
AutoSave Off File Home Insert Read Print Web Mode Layout Layout Views Page 1 of 3 1003 words Design Outline Draft Layout Dictionary Hands-on 13 - Word Mailings Focus Immersive Reader Immersive . References Vertical Side to Side Using a menu, lets manage a dictionary of employees. Here is the starter dictionary you should use in your program smeRist={101:"McNally", 102:"Sama", 103:"Jones"} Page Movement HANDS-ON 15 DICTIONARIES The menu should look like this: Welcome to the Employee Dictionary Press 1 to Add, 2 to Remove by ID, 3 to Update, 4 to View, 0 to Exit Display welcome message Loop until they choose exit Ruler Gridlines Navigation Pane Show Review Each menu choice should be a separate function. Add - will allow entry of a new key and last name. You should make sure the key is a valid int and not letters. You should also verify that the key does not already exist in the Dictionary. o Display menu and accept choice o Verify choice is valid for menu 0 Remove by ID - will allow the user to enter an employee ID to remove. Again, make sure the key is a valid int and not letters. You should also check that the key exists in the Dictionary. If the key is found, show the last name that is being deleted and then remove. Search View Help Update - will allow the user to enter an employee ID change the name value. Again, make sure the key is a valid int and not letters. You should also check that the key exists in the Dictionary. If the key is found, get the new name value, show the original last name and what it will be changed too. View - will display the current dictionary keys and values Exit - will display an exit message and can be part of the main function not its own function. In the main function: On exit menu choice o End loop o Print goodbye message and end program L100 Zoom 100% Use a nested if statement to manage the menu choice, calling the appropriate matching function. Extra Credit 10 points: Make an additional menu choice Remove by Name. This is hard. Allow the user to enter in a last name value and remove that person from the Dictionary. T Upload your py file and output file. Please run all menu options and test all your input, like seen in my sample run below. Add your last name as one of the employees. One Page EB Multiple Pages Page Width Zoom O Search New Arrange Split Window All View Side by Side [D] Synchronous Scrolling Switch Reset Window Position Windows Window HANDS-ON 15 DICTIONAMES Tram Phan Sample Output - red is input Welcome to the Employee Dictionary Press 1 to Add, 2 to Remove by ID, 3 to Remove by Name, 4 to Update, 5 to View, 0 to Exit 99 Not Valid menu choice Add an Employee ID and Name Please enter employee ID: 105 Please enter employee last name: Chandra Press 1 to Add, 2 to Remove by ID, 3 to Remove by Name, 4 to Update, 5 to View, 0 to Exit ab Press 1 to Add, 2 to Remove by ID, 3 to Remove by Name, 4 to Update, 5 to View, 0 to Exit 5 Macros Properties Currently in the Dictionary you have: dist_itemall(101, 'McNally'), (102, 'Sama'), (103, 'Jones')]) Press 1 to Add, 2 to Remove by ID, 3 to Remove by Name, 4 to Update, 5 to View, 0 to Exit 1 Add an Employee ID and Name Please enter employee ID: 101 ID already exists, please try again Please enter employee ID: abs Incorrect ID, please Try again Please enter employee ID: 104 Please enter employee last name: Garcial Press 1 to Add, 2 to Remove by ID, 3 to Remove by Name, 4 to Update, 5 to View, 0 to Exit 5 Currently in the Dictionary you have: dist .itemall(101, 'McNally'), (102, 'Sama'), (103, 'Jones'), (104, "Garcia')]) Press 1 to Add, 2 to Remove by ID, 3 to Remove by Name, 4 to Update, 5 to View, 0 to Exit 1 Macros SharePoint Remove by Employee ID Please enter employee ID to remove: aks Press 1 to Add, 2 to Remove by ID, 3 to Remove by Name, 4 to Update, 5 to View, 0 to Exit 1 Add an Employee ID and Name Please enter employee ID: 106 Please enter employee last name: Li Press 1 to Add, 2 to Remove by ID, 3 to Remove by Name, 4 to Update, 5 to View, 0 to Exit 5 Currently in the Dictionary you have: dist.itemal[(101, 'McNally'), (102, 'Sama'), (103, 'Jones'), (104, "Garcia'), (105, "Chandra'), (106, "Li")]) Press 1 to Add, 2 to Remove by ID, 3 to Remove by Name, 4 to Update, 5 to View, 0 to Exit 2 Focus BB 183 Cdx X Share + 75% 3:18 PM 4/3/2023 AutoSave Off File Home Insert Read Print Web Mode Layout Layout Views Page 1 of 3 1003 words Design Outline Draft Layout Dictionary Hands-on 13 - Word Mailings Focus Immersive Reader Immersive . References Vertical Side to Side Using a menu, lets manage a dictionary of employees. Here is the starter dictionary you should use in your program smeRist={101:"McNally", 102:"Sama", 103:"Jones"} Page Movement HANDS-ON 15 DICTIONARIES The menu should look like this: Welcome to the Employee Dictionary Press 1 to Add, 2 to Remove by ID, 3 to Update, 4 to View, 0 to Exit Display welcome message Loop until they choose exit Ruler Gridlines Navigation Pane Show Review Each menu choice should be a separate function. Add - will allow entry of a new key and last name. You should make sure the key is a valid int and not letters. You should also verify that the key does not already exist in the Dictionary. o Display menu and accept choice o Verify choice is valid for menu 0 Remove by ID - will allow the user to enter an employee ID to remove. Again, make sure the key is a valid int and not letters. You should also check that the key exists in the Dictionary. If the key is found, show the last name that is being deleted and then remove. Search View Help Update - will allow the user to enter an employee ID change the name value. Again, make sure the key is a valid int and not letters. You should also check that the key exists in the Dictionary. If the key is found, get the new name value, show the original last name and what it will be changed too. View - will display the current dictionary keys and values Exit - will display an exit message and can be part of the main function not its own function. In the main function: On exit menu choice o End loop o Print goodbye message and end program L100 Zoom 100% Use a nested if statement to manage the menu choice, calling the appropriate matching function. Extra Credit 10 points: Make an additional menu choice Remove by Name. This is hard. Allow the user to enter in a last name value and remove that person from the Dictionary. T Upload your py file and output file. Please run all menu options and test all your input, like seen in my sample run below. Add your last name as one of the employees. One Page EB Multiple Pages Page Width Zoom O Search New Arrange Split Window All View Side by Side [D] Synchronous Scrolling Switch Reset Window Position Windows Window HANDS-ON 15 DICTIONAMES Tram Phan Sample Output - red is input Welcome to the Employee Dictionary Press 1 to Add, 2 to Remove by ID, 3 to Remove by Name, 4 to Update, 5 to View, 0 to Exit 99 Not Valid menu choice Add an Employee ID and Name Please enter employee ID: 105 Please enter employee last name: Chandra Press 1 to Add, 2 to Remove by ID, 3 to Remove by Name, 4 to Update, 5 to View, 0 to Exit ab Press 1 to Add, 2 to Remove by ID, 3 to Remove by Name, 4 to Update, 5 to View, 0 to Exit 5 Macros Properties Currently in the Dictionary you have: dist_itemall(101, 'McNally'), (102, 'Sama'), (103, 'Jones')]) Press 1 to Add, 2 to Remove by ID, 3 to Remove by Name, 4 to Update, 5 to View, 0 to Exit 1 Add an Employee ID and Name Please enter employee ID: 101 ID already exists, please try again Please enter employee ID: abs Incorrect ID, please Try again Please enter employee ID: 104 Please enter employee last name: Garcial Press 1 to Add, 2 to Remove by ID, 3 to Remove by Name, 4 to Update, 5 to View, 0 to Exit 5 Currently in the Dictionary you have: dist .itemall(101, 'McNally'), (102, 'Sama'), (103, 'Jones'), (104, "Garcia')]) Press 1 to Add, 2 to Remove by ID, 3 to Remove by Name, 4 to Update, 5 to View, 0 to Exit 1 Macros SharePoint Remove by Employee ID Please enter employee ID to remove: aks Press 1 to Add, 2 to Remove by ID, 3 to Remove by Name, 4 to Update, 5 to View, 0 to Exit 1 Add an Employee ID and Name Please enter employee ID: 106 Please enter employee last name: Li Press 1 to Add, 2 to Remove by ID, 3 to Remove by Name, 4 to Update, 5 to View, 0 to Exit 5 Currently in the Dictionary you have: dist.itemal[(101, 'McNally'), (102, 'Sama'), (103, 'Jones'), (104, "Garcia'), (105, "Chandra'), (106, "Li")]) Press 1 to Add, 2 to Remove by ID, 3 to Remove by Name, 4 to Update, 5 to View, 0 to Exit 2 Focus BB 183 Cdx X Share + 75% 3:18 PM 4/3/2023
Expert Answer:
Related Book For
Essentials Of Marketing Analytics
ISBN: 9781264263608
1st Edition
Authors: Joseph Hair, Dana E. Harrison, Haya Ajjan
Posted Date:
Students also viewed these programming questions
-
This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of an array of objects as a class data...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
You are given the following information about two stocks: (a) Calculate the mean and standard deviation for each stock. (b) Compare the mean, standard deviation, and coefficient of variation of each...
-
1. Lobster World stores approximately 1,000 pounds of fish on average. In a typical day, the busy restaurant cooks and sells 360 (raw) pounds of fish. How long do the fish stay in storage on average?...
-
A gas turbine operates with a regenerator and two stages of reheating and intercooling. Air enters this engine at 14 psia and 60F; the pressure ratio for each stage of compression is 3; the air...
-
Radiation heat transfer can occur within porous media in conjunction with conduction, as heat is radiatively transferred across pores of interstitial fluid. Under certain conditions, the effects of...
-
Rooney Small Engine Repair charges $42 per hour of labor. It has a material loading percentage of 40%. On a recent job replacing the engine of a riding lawnmower, Rooney worked 10.5 hours and used...
-
Draw a Sankey Diagram of the energy flow to power an electric vehicle. Normalize the energy consumption of the vehicle to 1 ( that is , the width of the vehicle energy consumption flow will be 1...
-
The Foxridge Investment Group buys and sells rental income properties in southwest Virginia. Bill Hunter, president of Foxridge, has asked for your assistance in analyzing a small apartment building...
-
do law firms go after clients that don't have the money to pay
-
= Given f(x, y) corresponding to 4x xy+1y, find the directional derivative at (x, y) 2T 3 . Round to 5 decimal places as necessary. = (5, 2) in the direction
-
Personal Financial Goals Name(s): Deily Baldonado. Date: 01/11/2024 Short Term Goals (1 year or less) Meta Priority Target Date Estimated cost Save $5,000 for emergencies. 12 months. January 2025...
-
Thirty voters with the preference schedules below are to elect a union spokesperson from among five candidates: A, B, C, D, and E. If the Borda count is used, candidate B would win. Number of voters...
-
ABC Inc. s fiscal year end is December 3 1 and the company uses the periodic inventory method. EXCEL # 2 ( 2 0 1 9 and 2 0 2 0 ) 2 0 1 9 Transactions 1 . On October 2 8 , 2 0 1 9 , ABC Inc. was...
-
The reflection is a report given by each side giving you an opportunity to share your experience in a negotiation situation.In your reflection please provide the agreement that was reached. You will...
-
Cancer which is triggered by steroid hormones: cancer is caused by mutation in the receptor can be treated with anti-hormone therapy the source of hormone is exogenous usually originates from hormone...
-
The company manufactures three products: wooden chairs, tables and dressers. AFC started off as a 'Mom & Pop' shop but has grown rapidly. AFC uses one assembly line to build all three products,...
-
Exhibit 12-28 indicates which age groups are exiting the landing page at a slightly higher rate. Brainstorm some ideas that might be helpful to keep them engaged longer on our website. Exhibit 12-28...
-
What are some characteristics of data quality that need to be examined to avoid invalid analytics results?
-
How can marketers use natural language processing?
-
A and B contribute $20,000 each to form the AB partnership and agree to share profits and losses 80% to A and 20% to B. ABs partnership items for the year are as follows: (a) What is As portion of...
-
A and B form the AB equal general partnership. A contributes \($10,000\) cash and a depreciable asset with an adjusted basis of \($40,000\) and a fair market value of \($90,000.\) B contributes...
-
Which of the following taxpayers is engaged in a specified service trade or business? (a) A lawyer (b) An architect (c) A professional soccer player (d) A freelance writer who publishes articles and...
Study smarter with the SolutionInn App