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

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 ek The first line in the file represents sales data for week #1, the second line represents those for we #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: e Output A table that has three columns with appropriate headers. Each column of the table must o e aligned. The first 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. At the bottom of the table, display the total sales for all of the weeks and the average weekly sales. 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 ek The first line in the file represents sales data for week #1, the second line represents those for we #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: e Output A table that has three columns with appropriate headers. Each column of the table must o e aligned. The first 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. 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
Get step-by-step solutions from verified subject matter experts
