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
You have found an old dusty computer in your basement that you can identify as an original IBM PC. You ask your friend if he kno
fredd [130]

Answer:

Pentium

Explanation:

8 0
3 years ago
Maggie is preparing a business report. Which types of keys will she use to type out words and numbers?
nadya68 [22]
She would use enter period comma backspace
Hope this helps u
6 0
3 years ago
Read 2 more answers
This ingredient is often used as decoration for both hot and cold dessert​
soldier1979 [14.2K]

Answer: cream

Explanation: Cream This ingredient is often used as a decoration or accompaniment for both cold and hot desserts, but may also be used as one of the recipe ingredients.

Please mark as brainliest

8 0
1 year ago
What is the name of the symbol that is used to classify and categorize information?​
igomit [66]

Answer:

A Hashtag

Explanation:

3 0
3 years ago
Read 2 more answers
On a client/server network, data does not necessarily follow the same path between the request (client) and the response (server
Andrej [43]

Answer:

SSL and HTTPS play a factor

6 0
3 years ago
Other questions:
  • Encryption is the process of:
    12·1 answer
  • How many host ip addresses are available on a network with a subnet mask of 255.255.255.192?
    6·1 answer
  • Which of the following sentences uses the correct verb tense?
    8·2 answers
  • How do you convert a decimal to binary?
    9·2 answers
  • The following code processes a file containing five positive numbers. What will the variable $result contain after the code is e
    10·1 answer
  • What is sun and what does it do?
    12·2 answers
  • The study of a current business and information system application and the definition of user requirements and priorities for a
    5·1 answer
  • What is the ability for a system to respond to unexpected failures or system crashes as the backup system immediately and automa
    8·1 answer
  • A simulation system is a technology that enables you to take over a customer’s screen, mouse, or other connected device in order
    13·1 answer
  • How do I find unwanted programs on my computer?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!