subject

Complete the code to finish this program to analyze the inventory for a store that sells purses and backpacks. (python) Each record is composed of the catalog number, the type of item, its color, the length, width, height, and the quantity in stock.

Sample rows of the file are below.

234,purse, blue,12,4,14,10
138,purse, red,12,4,14,4
934,backpack, purple,25,10,15,3
925,backpack, green,25,10,15,7

import csv
fileIn = open("data/bags. txt","r")
countPurse = 0
aReader = csv. reader(fileIn)
for bag in aReader:
if bag[1] == 'purse':
countPurse = countPurse + int(bag[ ? ])
fileIn. close()
print("Number of purses:",countPurse)

6

7

5

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:30
Requirement types discussed during software development include functional and color scheme nonfunctional and code style constraint and nonfunctional fashionable and functional.
Answers: 2
question
Computers and Technology, 22.06.2019 17:30
Under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
How do you make a lenny face? plz, brailiest to who can answer first.
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
In the context of an internet connection, llc stands for leased line connection liability limited company local loop complex local loop carrier
Answers: 1
You know the right answer?
Complete the code to finish this program to analyze the inventory for a store that sells purses and...
Questions
question
Arts, 17.02.2021 19:30
question
Mathematics, 17.02.2021 19:30
question
Biology, 17.02.2021 19:30
question
Arts, 17.02.2021 19:30
question
Mathematics, 17.02.2021 19:30
question
Mathematics, 17.02.2021 19:30
question
Mathematics, 17.02.2021 19:30
Questions on the website: 13722361