Question: Create a program that dynamically displays a report of sales by quarter for a company with four sales regions (Region 1, Region 2, Region 3,
Create a program that dynamically displays a report of sales by quarter for a company with four sales regions (Region 1, Region 2, Region 3, and Region 4).
Total Sales by region: Region 1: $7,845.00 Region 2: $5,636.00 Region 3: $7,879.00 Region 4: $9,174.00 Total Sales by quarter: Q1: $5,355.00 Q2: $9,585.00 Q3: $9,398.00 Q4: $6,196.00 Total annual sales, all regions: $30,534.00 | ||||||||||||||||||||||||||||||
Specifications
- The quarterly sales numbers for each region should be hard coded at the beginning of the program as a list of lists like this:
sales = [[1540.0, 2010.0, 2450.0, 1845.0], # Region 1
[1130.0, 1168.0, 1847.0, 1491.0], # Region 2
[1580.0, 2305.0, 2710.0, 1284.0], # Region 3
[1105.0, 4102.0, 2391.0, 1576.0]] # Region 4
- Create output that follows the formatting shown in the display above.
- Use a formatting that dynamically changes based on the computers locale setting.
- Use for loops to calculate and display the totals by quarter and region, as well as the final total annual sales.
In python and indentation of the code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
