Question: python program using Task decomposition method with while loop .Practice basic file input. Assume that a file named salesData.txt containing the dollar amount of sales

 python program using Task decomposition method with while loop .Practice basic

python program using Task decomposition method with while loop

.Practice basic file input. Assume that a file named salesData.txt containing the dollar amount of sales that a retail store made each day for a number weeks exists on your computer's disk. Each line in the file contains seven numbers, which are the sales numbers for one week. The numbers are separated by a comma. The following is an example from the file: 2541.36, 2965.88,1965.32,1845.23,7021.11,9652.74,1469.36 The first line in the file represents sales data for week #1, the second line represents those for week #2, and so on. Write a Python program to open the file and process its contents. The program should report and display the following items: . The total sales for each week . The average daily sales for each week . The total sales for all of the weeks .The average weekly sales Assume the file resides on the same folder where your Python program is saved. A sample is provided for your unit testing. Please download it from canvas course site. However, the instructor will put different records in SalesData.txt for testing your submitted program. Please do unit testing with different text file formats on both Apple and Windows platforms to make sure your program can correctly handle their incompatibilities, if any User interface specifications: Output o A table that has three columns with appropriate headers. Each column of the table must be aligned. The finst column is for week number,the second column displays total sales for each week, and the third column reports the average daily sales for each week. o At the bottom of the table, display the total sales for all of the weeks and the average weekly sales

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!