Computers and Technology

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

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 14:30, chaparro0512
Create a pseudocode design to prompt a student for their student id and the titles of the three classes they want to add. the solution should display the student’s id and a total bill. • bill a student using the following rules: o students can only add up to 3 classes at a time.
Answers: 3
image
Computers and Technology, 22.06.2019 16:30, buky0910p6db44
Corey set up his presentation for delivery to his team. the information he had to convey was critical to their job performance. he knew he would need a lot of time to explain each point
Answers: 3
image
Computers and Technology, 23.06.2019 12:00, clevelandjaniya1
Which of these is a benefit of using objects in a powerpoint presentation? a. collaborators can create the external files while you create and edit the slide show. b. you can easily change the theme and design of the presentation. c. you can have older data in the source file while having up-to-date data in the presentation. d. collaborators can easily share the presentation.
Answers: 2
image
Computers and Technology, 24.06.2019 00:30, petergriffin6772
Which boolean operator enables you to exclude a search term? a} not b} and c} or d} plus
Answers: 1
Do you know the correct answer?
Complete the code to finish this program to analyze the inventory for a store that sells purses and...

Questions in other subjects:

Konu
Mathematics, 27.03.2020 02:11
Konu
Mathematics, 27.03.2020 02:11