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
What is pressure?
Licemer1 [7]
"force per unit area" because pressure is force per unit area.

hope this helped
6 0
3 years ago
Read 2 more answers
Enter the cube's edge: 4<br> The surface area is 96 square units.<br> Python
mr_godi [17]

Answer:

See the program code below.

Explanation:

def cube_SA(edge):

 edge = int(input("Enter the cube's edge: "))

 sa = edge * edge * 6

 print("The surface area is {} square units".format(sa))

cube_SA(4)

Best Regards!

5 0
3 years ago
What kind of software would you use to view and troubleshoot protocol-specific problems such as TCP retries caused by missed ack
sveticcg [70]

Answer:

The kind of software to use is a protocol analyser.

Explanation:

The Protocol analyser, which could either be a hardware or a software is a tool that is used for capturing and analysing signals and also interpreting network traffic over a communication channel or between two or more connected computer systems

Protocol analysers can be used to find out location of problems on Local Area Network by examining flow of traffic.

7 0
3 years ago
"abstraction" is often used to focus on a general case and ignore a specific instance of a problem. Given this meaning of the wo
prisoha [69]

Answer:

Abstraction is the process of removing or taking away certain characteristics to reduce or hide several very important characteristics.

In OOP (Object Oriented Programming), to increase efficiency and reduce complexity, a programmer hides certain vital data about an object. This is abstraction in programming.

For further clarification, a programmer ensures that the name given to an entity makes sense and most importantly, that it carries relevant aspects, and non essential parts are not included.

3 0
3 years ago
to save a revised document as the original name and in the original file location, a user should select _____. save as file new
Schach [20]
The answer is just save
5 0
3 years ago
Read 2 more answers
Other questions:
  • Default tab stops are set in Word every _______ inch.<br> a. ¾<br> b. 1<br> c. ½<br> d. ¼
    13·1 answer
  • A security policy is a
    11·1 answer
  • Which of the following is a school-to-work program that provides the student with paid employment, school credit, and school gra
    7·2 answers
  • 99 points!!! What would happen to the document if the change “A” is pointing to was accepted? a. There would be no changes. b. “
    6·2 answers
  • ERP packages are always quite simple.<br><br> True<br><br> False
    5·1 answer
  • Implement the RC4 stream cipher in C++. User should be able to enter any key that is 5 bytes to 32 bytes long. Be sure to discar
    7·1 answer
  • Although some families have more resources than other families, there is always a limited amount of resources that families have
    15·2 answers
  • ______ are used to store all the data in a database.
    7·1 answer
  • What is NOT a built-in function in python?<br> sqrt()<br> string()<br> fabs()<br> O print()
    12·2 answers
  • _____is used to organize and modify the properties of the current selection.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!