Calculate sales by reading lists project

1.I have posted a file on Canvas containing information about the recent sales at a hardware store. The file name is inventory.txt. Download the file and save it in the same directory as your .py files will be. 2.Open the file inventory.txt and look at it.You’ll see that each line has 3 pieces of information. The first is the department name. We only have a Lighting, a Plumbing and a Garden department at our little store. Be careful to not make any changes to this file. If you happen to make a change,feel free to download a “clean” version of the file and start over. Your job is to write a program which calculates the total sales for the hardware store as well as the total sales for each department. Your final output should look like this (with the correct numbers, though). Notice the line spacing and formatting of the values. Sales by Department: Plumbing: $3568.24 Lighting: $241.34 Garden: $6423.21 Total Sales: $10232.79 Requirements: 1.Each line in the file must be read as a string and then split into a list. 2.Based on the department name in the line that was just read, add the value of the sales to the total sales for that department. Remember, we read the line as a string, converted it to a list of strings -but we can only add numbers.You will be ignoring the second data value in each line…..for now. 3.At the end, print the total sales for the entire store. Assumptions that you may make: 1.The file exists and contains at least one line. 2.There are no lines which have any department other than those 3 departments. 3.All data is “valid” (i.e. the 3rdvalue in each line is a number, the 1st value is a valid department) Grading: 20% comments are appropriate and found throughout the program adding to the understanding of the program 20% variable names are meaningful and descriptive 20% structures in the program are as required and are used appropriately for the problem 40% program runs correctly and produces correctvalues and correctly formatted output

Get Help With a similar task to - Calculate sales by reading lists project

Login to view and/or buy answers.. or post an answer

Related Questions

Similar orders to Calculate sales by reading lists project
50
Views
1
Answers
Computing the average grades by making classes
I will include all specific instructions within my files. I can rename the files once I receive them so the naming is not very important. This is for an introductory class so I need to be as simple as possible, but following the instructions....
29
Views
1
Answers
1. To demonstrate use and understanding of sequence, selection and iteration control structures in Python
To write a program that serves as a partial inventory processing system for The Book Warehouse, a non-profit organization that accepts donations of used books. Every weekend, people bring books to donate. Every book is logged by title, format (paperback, ...
24
Views
1
Answers
Python fundamentals (strings, sets, lists, functions)
5 total questions for an intro to python class. Just need to follow the directions in the python file an create the code. The last 2 questions requires the use of some data in 3 separate text files included in the the files I uploaded....
41
Views
1
Answers
Help with programs in python
There are 3 different programs in python attached, if you can please do them neatly and add comments. Coding language is python...