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]
4 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]4 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
Big Chungus is god. prove me wrong.
lisabon 2012 [21]

Answer:

who is Big chungus???

Believe in Lord Buddha !

6 0
3 years ago
PLEASE HELP GIVING 25 POINTS Sophia is leading a project to help clean up a local river in her area. She creates an online forum
nignag [31]

Answer:

She holds useful online meetings

Explanation:

5 0
3 years ago
Read 2 more answers
When does personal information often need to be entered online?
soldi70 [24.7K]

Answer:

Like when your doing an application for a job or anything important lol

Explanation:

3 0
3 years ago
Data is physically transmitted from one computer or terminal to another in the ________ layer. physical transport application te
omeli [17]

Answer:

The correct answer to the following question will be "Physical".

Explanation:

  • The lowest layer of the OSI model is the physical layer. It's in charge of transferring bits through one device to the next.
  • This layer isn't worried about the importance of the components and deals with setting up a connection to the node of the network and transmitting and receiving a signal.

Therefore, the Physical layer is the right answer.

7 0
4 years ago
You can restore an event you deleted by mistake in Calendar by ______.
andre [41]

Answer:

1.Clicking on the event date and adding it again

3 0
3 years ago
Other questions:
  • Ben buys an Olympus E-PL2 from Sony which starts malfunctioning. When he opts for an exchange, the customer representative says
    11·1 answer
  • We have two processors. They are named PL and PS. PL has a large number of registers, and PS has a small number of registers. Th
    7·1 answer
  • Write a C++ program that will ask the user for the name of a data file.
    11·1 answer
  • 38. To select nonadjacent items, select the first item, such as a word or paragraph, as usual; then, press and hold down the ___
    8·1 answer
  • A. What sectors are used with Foo?
    8·1 answer
  • Why is ssh preferred over telnet for remote connections?
    10·1 answer
  • PLEASE HURRY PLEASE HELP THIS CLASS ENDS TODAY AND I NEED HELP
    7·1 answer
  • What are the different types of firewalls? Which one is best?
    5·1 answer
  • *please be serious and also answer everything * <br> I will also mark you brainliest :)
    6·1 answer
  • To create a cell reference in another spreadsheet you must need to start with _______ sign.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!