Question: Please help with Python. Chapter 12 Monthly Sales Create a program that allows you to view and edit the sales amounts for each month of

Please help with Python. 
Chapter 12 Monthly Sales Create a program that allows you to view and edit the sales amounts for each month of the current year. The program will use a dictionary to store the data instead of a list. Follow the formatting shown in the sample output Console Monthly sales program COMMAND MENU view - View sales for specified month edit - Edit sales for specified month totals - View sales summary for year exit - Exit program Command: view Three-letter Month: Jan Sales amount for Jan is 616.00. Command: edit Three-letter Month: Jan Sales Amount: 651 Sales amount for Jan is 651.00. Command: totals Yearly total: 7,535.00 Monthly average: 627.92 Command: view Three-letter Month: July Invalid three-letter month Command: exit Bye! Specifications Use the text file named monthly sales.txt that consists of tab delimited rows, where the rows contain three-letter abbreviations for the month and the monthly sales. Create a module level constant to hold the name of the text file. The program should contain a function that reads the file and store the sales data for each month in a dictionary with the month abbreviation as the key for each sales value item. For each line of text in the file remove the new line character and split the tab delimited row into a list that is used to create the dictionary elements. The function will return the dictionary of all key/value elements. The program should contain a function that writes the dictionary values to the file. The dictionary will be passed to the function as a parameter. For each month and sales amount key value pair in the dictionary write a tab separated line to the text file. Whenever the sales data is edited, the program should write the changed data to the text file. When viewing or editing a month, check if the input month is a valid key in the dictionary and display a message if the three-letter month is not valid. Use functions to organize the code for each of the commands. . . monthly_sales.txt JUL 9762 DEC 2497 MAY 2429 MAR 1073 APR 3463 OCT 6735 AUG 15578 JUN 4324 FEB 4176 NOV 88 JAN 651 SEP 2437
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
