subject

You will be reading in the data from the file SalesJan2009.csv. When you do, you need to save all the items from the PRICE field into a list called amtCollected. After you get them all in that list, you will need to create a variable called total that holds the sum of all the numbers in the list. Then create a variable called avg that holds the average of the numbers in the list. Now, print the following strings: "Total is $(total)" and "Average price is $(avg)"Be sure to replace the (total) and (avg) with the value in the variables. Be sure to do casting where necessary. You may use DictReader to read the data from the csv file and then put that dictionary data into the intended list.



I'm terribly confused on how to start on this... but this is how I started it

import csv

amtCollected = []
with open("SalesJan2009.csv", "r+") as csv_file:
csv_reader = csv. reader(csv_file, delimiter= ',')
for line in csv_reader:
print(line[2])

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 11:30
In cell h5 enter a formula that will calculate the percentage of attendees that went to the altamonte springs job fair in 2018.
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
In excel - calculate the actual increase/decrease from first quarter to the second quarter then subtract subtract first quarter value from second quarter total then divide result by first quarter value
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Apunishment or the threat of punishment used to enforce conformity. select the best answer from the choices provided t f
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Uget brainliest if accurate mary has been given the responsibility of hiring a person for the position of a software testing officer. which management function would mary achieve this responsibility?
Answers: 1
You know the right answer?
You will be reading in the data from the file SalesJan2009.csv. When you do, you need to save all th...
Questions
question
Mathematics, 10.11.2020 21:40