1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Masja [62]
2 years ago
13

Complete the code to finish this program to analyze the inventory for a store that sells purses and backpacks. Each record is co

mposed 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 textFile= csv.(fileIn) for bag in textFile: if bag[1] == 'purse': countPurse = countPurse + int(bag[6]) fileIn.close() print("Number of purses:",countPurse)
Computers and Technology
1 answer:
Volgvan2 years ago
5 0
Import csv
fileIn = open("data/bags.txt","r")
countPurse = 0
textFile= csv.reader(fileIn)
for bag in textFile:
if bag[ 1 ] == 'purse':
countPurse = countPurse + int(bag[6])
fileIn.close()
print("Number of purses:",countPurse)
You might be interested in
Suppose two hosts, A and B, are separated by 20,000 kilometers and are connected by a direct link of R = 2 Mbps. Suppose the pro
AnnZ [28]

Answer:

a. (210^6)((210^7)/(2.510^8)) = 1.610^5 bits or 160,000 bits

b. 1.6*10^5 bits or 160,000 bits

c. Bandwidth delay product of link is maximum number of bits that can be in the link

d. Width of bit = Length of link / bandwidth-delay product so 1 bit is 125 meters long. Yes, this is longer than a football field.

e. Width of bit = s/R

Hope this helps :)

3 0
2 years ago
Simpson is trying to solve an equation related to converting a decimal number to its hexadecimal form. He decides to utilize the
Marina86 [1]
Divide 1210 by 16  and write reminder divide until value zero 

first step divide 1210 by 16 =  10 
then 75 divide by 16 =  11
4 

we can write 4 B A 
in hexadecimal 

4 0
3 years ago
Knowledge Spark, a school with no current job openings, wants to change to a completely virtual environment and offer classes to
Sedaia [141]

Answer:

AMONG

Explanation:

US

6 0
2 years ago
In the belt drive mechanism, what happens when the belt is crossed instead of open?
KengaRu [80]
They will spin in the opposite direction because the belts are twisted.
8 0
3 years ago
What is the configuration of a multimedia computer​
sertanlavr [38]

Answer:

) In computers and computer networks, a configuration often refers to the specific hardware and software details in terms of devices attached, capacity or capability, and exactly what the system is made up of.

Explanation:

hope it helps

3 0
3 years ago
Other questions:
  • Programmers use _____ languages in the Rapid Application Development (RAD) methodology to facilitate code reuse?
    5·1 answer
  • What is the opportunity cost of computers when moving from point A to point B? -15 DVDs b. What is the opportunity cost of compu
    13·1 answer
  • What are language standards? At this point in your study of programming, what do they mean to
    5·1 answer
  • What is the role of the osi application layer? provides control of all the data flowing between the source and destination devic
    5·1 answer
  • What impact did congress declaration on copyrighting sound recordings have on home recording and record sales
    8·2 answers
  • How do you put a picture when you ask a question?
    6·2 answers
  • Discuss the major differences in two approaches ofprogramming i.e. Object oriented programming and structuredprogramming.
    6·1 answer
  • Whose job is it to ensure that a group stays focused and on schedule?
    8·1 answer
  • What type of platform is Twitter?
    10·2 answers
  • We begin with a computer implemented in a single-cycle implementation. When the stages are split by functionality, the stages do
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!