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
Nesterboy [21]
3 years ago
11

Define a function below called average_strings. The function takes one argument: a list of strings. Complete the function so tha

t it returns the average length of the strings in the list. An empty list should have an average of zero. Hint: don't forget that in order to get a string's length, you need the len function.
Computers and Technology
1 answer:
tester [92]3 years ago
6 0

Answer:

def average_strings(lst):

   total_length = 0

   avg = 0

   for s in lst:

       total_length += len(s)

   avg = total_length/len(lst)

   return avg

Explanation:

Create a function called average_strings that takes one parameter, lst

Initialize the total length and avg variables

Create a for loop that iterates through the lst. Get each string's length and put it to the total length

When the loop is done, calculate the average, divide total length by length of the lst

Return the average

You might be interested in
A computer has the following parameters Operation Frequency Cycles Arithmetic/Logical instructions 65% 1 Register load operation
Julli [10]

Answer:

that right

Explanation:

i agree

4 0
3 years ago
Mark works as a Network Administrator for NetTech Inc. The company has a Windows Server 2008 domain-based network. The network c
mart [117]

Hello This Answer Is Not Real This Is All A Simulation

5 0
3 years ago
Which access object cannot be used to enter or edit data
kap26 [50]

Answer:

Should be B. table !

6 0
2 years ago
Read 2 more answers
Is it ok to give a website your zip code?
Salsk061 [2.6K]
When a website takes in personal information from a user, the owners of the website have no idea what was input, no matter how hard they tried. The information is not stored, and is used by Javascript APIs to locate your address to either ensure that it is valid, or so that you can choose your address.

It's completely safe, and if a website looks really, really sketchy, then just don't give them anything personal.

Another way to identify if a website is safe to give your personal information to is if you see "HTTPS" in the URL at the top of your browser. This means Hyper Text Transfer Protocol Secure, and is the protocol used to transfer information over the internet SECURELY, via encryption that only computers are able to decrypt, and will not show that information to owners of the server/website.
5 0
3 years ago
A hacker has successfully infected an internet-facing server which he will then use to send junk mail, take part in coordinated
julia-pushkina [17]
Botnet Trojan. Hopefully that’s helpful :)
5 0
3 years ago
Other questions:
  • 2. You have classes to represent different shapes (see below). You realize you can benefit from inheritance and polymorphism by
    13·1 answer
  • The create_python_script function creates a new python script in the current working directory, adds the line of comments to it
    9·1 answer
  • Select the correct answer.
    10·2 answers
  • Write a function named change() that has an integer parameter and six integers reference parameters named hundreds, fifties, twe
    7·1 answer
  • The arguments in a method call are often referred to as ____ . The variables in the method declaration that accept the values fr
    10·1 answer
  • Software that was designed to serve the needs of a specific company or organization is called:
    11·1 answer
  • What maintains data about various types of objects, events, people, and places?
    10·1 answer
  • Difference between switch and switch lite
    10·1 answer
  • Fifteen years ago, everyone didn't have a cell phone. Anyone developing an app would not have found many users. Today, the exist
    12·1 answer
  • Chantal has configured the network at her company's new headquarters with a number of VLANs. All devices joined to the individua
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!