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
Levart [38]
3 years ago
7

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

Computers and Technology
1 answer:
sp2606 [1]3 years ago
3 0

Answer:

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)

Explanation:

I hope this helps!

You might be interested in
To make sound decisions about information security, management must be informed about the various threats facing the organizatio
const2013 [10]

Answer:

The answer is A. True

Explanation:

It is the responsibility of management to be aware of the current and potential threats that the organization is facing or prone to face in the nearest future. The threats could be focused on data integrity, valuable information, applications, or human personnel.

Hence, to make adequate decisions on information security, the management must take an assessment of the current situation of the organization and make plans towards securing the organization.

8 0
3 years ago
Write a function, called valFrequency, that given a list of values as a parameter, counts the frequencies for each value in the
Marat540 [252]

Answer:

pray for me i fell sick

Explanation:

i ate a piece of carrot now im blind

7 0
2 years ago
a. Do you think the U.S. government should censor information on the Web, such as instructions for making weapons, to protect th
MrRissso [65]

Answer:

The answer is YES.

Explanation:

<em>Things pertaining to weapons, destructive materials should be shared with precautions or much better if these things should not be put online. Since internet is widely available to almost all types of users and almost to all places, we cannot be sure of who will get hold of these information. Kids could easily see this and gain knowledge and out of curiosity will try these dangerous things. Terrorist groups will also have access to these information and who knows might happen to poor innocent souls around.  </em>

<em> </em>

<em>I don't think it would violate the right of First Amendment regarding freedom of speech. Freedom should be granted on matters that are most sensible. And this time, we are just protecting the rights of children and other innocent people who can be a victim including you. We are talking about weapons and destructive materials here which is non beneficial if one could get hold of this information, in my opinion. If there is really a need to construct these things, it is better to consult an expert or an authority to ensure that nobody gets harm.</em>  

5 0
3 years ago
A) How could you modify Shelve with a technique discussed in class so that you can create Shelve instances that contain // Tools
Kay [80]

Answer:

See explanation

Explanation:

A “shelf” is a dictionary-like object. A shelf is an arbitrary Python objects, that is; anything that the pickle module can handle. This includes recursive data types and objects containing lots of shared sub-objects. It must be noted that the keys are ordinary strings.

(A). modification to Shelve can be done by following this instructions;

(1). Do not redefine built-in functions,(2). grab shelved item, mutate item, write mutated item back to shelf.

The number (2) instructions is during iteration over shelved items.

(B). CREATING FUNCTIONS THAT TAKES IN TWO SHELVES;

import shelve

d = shelve.open(filename) # open -- file may get suffix added by low-level

# library

d[key] = data # store data at key (overwrites old data if

# using an existing key)

data = d[key] # retrieve a COPY of data at key (raise KeyError if no

# such key)

del d[key] # delete data stored at key (raises KeyError

# if no such key)

flag = key in d # true if the key exists

klist = list(d.keys()) # a list of all existing keys (slow!)

# or, d=shelve.open(filename,writeback=True) would let you just code

# d['xx'].append(5) and have it work as expected, BUT it would also

# consume more memory and make the d.close() operation slower.

d.close() # close it

3 0
4 years ago
You have been on the phone with a user in a remote office for 30 minutes troubleshooting their minor desktop problem. No matter
Alecsey [184]

Answer:

D

Explanation:

First when you are troubleshooting a client your main goal is to solve their issue, you dont want to say hey call later i cant help you or say call someone else because picture this you need help and someone hangs up on you or says (B.) or (C.) it comes off as rude i would say. Regarding (A.) im not 100% sure what exactly do you mean by user's site? But asking for their manager (D.) or someone else (preferably higher up) seems to be the right action to be taken.

4 0
3 years ago
Other questions:
  • What command launches the remote desktop client for windows?
    12·1 answer
  • An attacker captures an encrypted message. he tries decrypting with every possible key until the decryption process reveals a se
    14·1 answer
  • Suppose you have a primary location in New York City where you main corporate servers are located. Just in case something happen
    5·1 answer
  • Which of the following is not a data type in python Float, string, integer, decimal ​
    15·2 answers
  • Disk ___________________ helps improve the speed and efficiency of a hard disk.
    6·1 answer
  • Name the part of windows<br> explore window​
    7·2 answers
  • The router can deliver packets directly over interfaces 0 and 1 or it can forward packets to Routers R2, R3, or R4. Describe wha
    10·1 answer
  • Guys how can i video my self from my laptop <br> my laptop is (lenovo)
    8·2 answers
  • How to enhance the video to full screen in filmora
    15·1 answer
  • What are the 3 attributes of information?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!