Page 1 of 1

Overview Create a Python application that will read from 3 input files and use the data within to produce 2 output files

Posted: Fri Jul 01, 2022 5:47 am
by answerhappygod
Overview Create A Python Application That Will Read From 3 Input Files And Use The Data Within To Produce 2 Output Files 1
Overview Create A Python Application That Will Read From 3 Input Files And Use The Data Within To Produce 2 Output Files 1 (38.53 KiB) Viewed 39 times
Overview Create A Python Application That Will Read From 3 Input Files And Use The Data Within To Produce 2 Output Files 2
Overview Create A Python Application That Will Read From 3 Input Files And Use The Data Within To Produce 2 Output Files 2 (49.02 KiB) Viewed 39 times
Overview Create A Python Application That Will Read From 3 Input Files And Use The Data Within To Produce 2 Output Files 3
Overview Create A Python Application That Will Read From 3 Input Files And Use The Data Within To Produce 2 Output Files 3 (14.14 KiB) Viewed 39 times
Overview Create A Python Application That Will Read From 3 Input Files And Use The Data Within To Produce 2 Output Files 4
Overview Create A Python Application That Will Read From 3 Input Files And Use The Data Within To Produce 2 Output Files 4 (33.07 KiB) Viewed 39 times
Overview Create A Python Application That Will Read From 3 Input Files And Use The Data Within To Produce 2 Output Files 5
Overview Create A Python Application That Will Read From 3 Input Files And Use The Data Within To Produce 2 Output Files 5 (69.35 KiB) Viewed 39 times
Overview Create a Python application that will read from 3 input files and use the data within to produce 2 output files. The 5 filenames should be taken as command-line parameters such as the following example: python report.py -t TeamMap.csv -p ProductMaster.csv -s Sales.csv --team-report-TeamReport.csv --product-report-ProductReport.csv Constraints ● . . Code to be written for Python 2.7 or higher Code should only use built-in Python packages (and not use third-party packages such as pandas) Deliverable should be a zip file containing project code, related files, and instructions for installing and executing the application. While there is no specific guidance on the code, the resulting application should meet your personal standards for a production-ready deployment.
Input Files Team Map The Team Map file is a comma-separated text file where each line contains two values: an integer uniquely identifying a team and the string name of the team. The unique id may be assumed to be positive. The string team name is not quoted and may be assumed not to contain commas or non-ASCII characters. The file does contain a header with the field names. An example file is as follows: TeamId, Name 1, Fluffy Bunnies 2, White Knights 3, Kings and Queens Product Master The Product Master file is a comma-separated text file where each line contains information about a unique product. The fields of the file are as follows: . ProductId-an integer uniquely identifying the Product Name - a string name of the Product Price-a floating point price at which the Product is sold (per unit, not per lot) LotSize an integer representing the number of products sold in a single lot The numerical fields may be assumed to be positive. The string fields are not quoted and may be assumed to ● . ●
not contain commas or non-ASCII characters. The file does not contain a header. An example file is as follows: 1, Minor Widget, 0.25,250 2, Critical Widget, 5.00, 10 3, Complete System (Basic), 500, 1 4, Complete System (Deluxe), 625, 1
Sales The Sales file is a comma-separated text file where each line contains information about a unique sale. The fields of the file are as follows: SaleId an integer uniquely identifying the sale ProductId-an integer identifying the Product (matches the Productld from the Product Master) TeamId-an integer identifying the Sales Team (matches the Teamid from the Team Map) Quantity-an integer representing how many lots of the product were sold . Discount- a floating point discount percentage given on the sale (e.g. 2.5% discount as "2.50") All of the numerical fields may be assumed to be positive. The file does not contain a header with the field names. An example file is as follows: . . . 1,1,2,10,0.00 2,1,1,1,0.00 3,2,1,5,5.00 4,3,4,1,2.50 5,3,5,2, 8.00
Calculations Sales calculations for the output reports should contain total gross revenues. Prices in the Product Master are per unit, and Sales are given in lots. Gross revenue should not be reduced by the discounts. Output Files Team Report The Team Report file is a comma-separated text file where each line contains two values: the string name of the sales team and the total gross revenue of their team's sales. The file should contain a header with the field names, and teams should be in descending order by their gross revenue. An example file is as follows: Team, GrossRevenue White Knights, 30895.25 Kings and Queens, 20851.00 Fluffy Bunnies, 7924.50 Product Report The Product Report file is a comma-separated text file where each line summarizes the sales of a single Product and contains four values as follows: Name-name of the Product GrossRevenue-gross revenue of sales of the Product ● TotalUnits - total number of units sold in the Product Discount Cost - total cost of all discounts provided on sales of the Product The file should contain a header with the field names, and the products should be provided in descending order of their gross revenue. An example file is as follows: Name, GrossRevenue, TotalUnits, Discount Cost Critical Widget, 55000, 11000,0 Complete System (Deluxe), 12500, 20, 1250 Minor Widget, 7500, 30000, 600