
I need help with this
Console
Specifications that are required for the program:
- The program should use a list to store the sales data for each month with the three-letter abbreviation for the month (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, and Dec) as the key for each item.
- When the program starts, it should read the sales data inserted from the user.
- If the user edits the sales data, the program should edit the data
- Must be able to use the add command to add the data for the given month
- If the user selects total, the program should calculate the total sales and average monthly sales.
- Use functions to view sales, edit sales, calculate the total, and calculate average.

Source code of the Python Program
command = input("Command: ")
Month = input("Three-letter Month: ")
Sales_Amount = input("Sales_Amount: ")
print("Sales_Amount for",Month,"is", Sales_Amount,".00.")
total = 0
while 'exit'!= command:
command = input("Command: ")
if command=='add':
Month = input("Three-letter Month: ")
Sales_Amount = int(input("Sales_Amount: "))
total = total+Sales_Amount
print("Sales_Amount for",Month,"is", Sales_Amount,".00.")
elif command =='view':
Month = input("Three-letter Month: ")
print('Sales_Amount:',Sales_Amount)
print("Sales_Amount for",Month,"is", Sales_Amount,".00.")
elif command == 'edit':
Month = input("Three-letter Month: ")
print("Sales_Amount for",Month,"is " )
Sales_Amount = int(input())
total = total+Sales_Amount
elif command =='totals':
print("yearly totals: ", totals)
print("Monthly average", totals/2)
elif command =='exit':
print("Bye!")
break
Output
Command: add
Three-letter Month: jan
Sales_Amount: 10317
Sales_Amount for jan is 10317 .00.
Command: add
Three-letter Month: feb
Sales_Amount: 15293
Sales_Amount for feb is 15293 .00.
Command: viw ew
Three-letter Month: feb
Sales_Amount: 15293
Sales_Amount for feb is 15293 .00.
Command: edit
Three-letter Month: jan
Sales_Amount for jan is
14317
Command: exit
Bye!
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 2 images

- Computer Science Part C: Interactive Driver Program Write an interactive driver program that creates a Course object (you can decide the name and roster/waitlist sizes). Then, use a loop to interactively allow the user to add students, drop students, or view the course. Display the result (success/failure) of each add/drop.arrow_forwardprogram must include a processing loop that allows multiple sets of data to be processed and the program should be terminated when there is no more data to process Develop a program in python that allows the user to enter a start value of 1 to 4, a stop value of 5 to 12 and a multiplier of 2 to 8. The program must display a multiplication table with results using these values. For example, if the user enters a start value of 3, a stop value of 7 and a multiplier value of 3, the table should be displayed as follows: Multiplication Table 3 x 3 = 9 3 x 4 = 12 3 x 5 = 15 3 x 6 = 18 3 x 7 = 21 Run the program with the following values: Start Stop Multiplier 2 10 4 4 12 6arrow_forwardThis is to be done using Visual Studio and the information input needs to be stored in an array of records.arrow_forward
- To remove the value of a variable but keeping the variable in PowerShell, we can use this cmdlet: Group of answer choices Delete-Value Clear-Variable Clear-Value Remove-Variablearrow_forwardSTART Declare variables: evenCount = 0 oddCount = 0 continueProgram = true WHILE continueProgram = true Display "How many random numbers to generate?" Input quantity Set counter = 1 WHILE counter <= quantity Set randomNumber = Random number between 1 and 500 IF randomNumber % 2 = 0 THEN Set evenCount = evenCount + 1 ELSE Set oddCount = oddCount + 1 END IF Set counter = counter + 1 END WHILE Display "Total even numbers: " + evenCount Display "Total odd numbers: " + oddCount Display "Do you want to generate another set of random numbers? (yes/no)" Input response IF response = "no" THEN Set continueProgram = false END IF END WHILE Display "Program ended."END convert the code to Flowgorithm chartarrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY





