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
allochka39001 [22]
2 years ago
6

The function below takes a single argument: data_list, a list containing a mix of strings and numbers. The function tries to use

the Filter pattern to filter the list in order to return a new list which contains only strings longer than five characters. The current implementation breaks when it encounters integers in the list. Fix it to return a properly filtered new list.
Computers and Technology
1 answer:
Doss [256]2 years ago
6 0

Answer:

def filter_strings(data_list):

   string_list = []

   for s in data_list:

       if type(s) == str and len(s) > 5:

           string_list.append(s)

   return string_list

Explanation:

Create a function called filter_strings that takes data_list as a parameter

Initialize a new list to hold the strings that are longer than 5 characters

Initialize a for loop that iterates through the data_list

Check the elements if they are string - use type function, and if their length is greater than 5 - use len function. If an element satisfies the both conditions, put it to the string_list

When the loop is done, return the string_list

You might be interested in
in a management information system, the quality of information is determined by its usefulness to users, and its usefulness dete
Gekata [30.6K]

Answer:

It is true, that in a management information system, the quality of information is determined by its usefulness to users, and its usefulness determines the success of the information system.

Explanation:

A management information system (MIS) is a computerized and centralized database that collects data from many different resources in the organization. And, then processes and organized the data in a way that would be useful and helpful in making a business decision. These days, for both large and small organization, collection of data and use of technology are so prevalent and these organization collecting the data from their businesses resources daily even hourly such as daily sale, daily expense, hourly wages, etc, and then managing it in a way to make a right business decision. A good MIS in an organization gives a competitive advantage because it turns the data into usable and into helpful information that can be used in making business decisions and strategy and to increase profit.

However, the information quality is based on its usefulness to the user or to the organization. Because if the MIS produces the information that is not useful to the user, the information and use of MIS are useless in the organization because the information that is required in making a business decision is not useful.

If the MIS produces the quality information to its user in making the right business decision and organization or user take the right decision that brings profit to the organization.  Then, this use of information determines the success of an information system in an organization.

For example:

In a Bakery, the MIS produce the right information in making decision e.g. MIS produce information to bakery owner that on valentine day, most people buy chocolate. Then, the owner tries to meet the demand for chocolate on valentine's day. Therefore, this is the quality of information and it is determined by its usefulness to the bakery owner and its usefulness determines the success of MIS.

4 0
3 years ago
Vadik is creating a program where the user inputs their grade level and the program tells them which sports teams they are allow
Lelechka [254]
He should use if, elif, else
4 0
2 years ago
Read 2 more answers
What is the boundary folding method?
Romashka [77]

Answer:

 Boundary folding method is basically used in the java algorithm and in the hash table. In the hash function, the left and the right value are basically folded in the fixed boundary between the given center values by using the boundary folding methods.

There are basically two types of folding method in the hashing that are:

  • Folding shift
  • Folding boundary

In the folding boundary method the outside value are get reversed and the alternate values are get flipped at the boundary folding method.

4 0
3 years ago
How to become a web developer ?​
statuscvo [17]

Explanation:

1.By Learning web development Fundamentals.

2.Choose a development specialization.

5 0
3 years ago
Which of the following best describes a server?
Lady_Fox [76]

Answer:

number 4

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • A brick weighs 26 N. Measured underwater, it weighs 11 N.
    10·1 answer
  • What are the key goal, performance, and risk indicators?
    15·1 answer
  • What is a spreadsheet program?<br> A spreadsheet program is a computerized version of_________.
    6·2 answers
  • A(n) monitoring vulnerability scanner is one that listens in on the network and determines vulnerable versions of both server an
    7·1 answer
  • Organizing speech ideas according to physical space, direction, or location calls for a _____ organizational pattern.
    11·1 answer
  • Presentation graphics programs contain an assortment of tools and operations for creating and editing slides, including preforma
    8·2 answers
  • How did the use of ARPANET change computing?
    14·1 answer
  • Keira is creating an app for her cross-country team. Users will input their race times and the output will be a graph showing th
    6·1 answer
  • What safety do you need to have ready to start a device repair?
    6·1 answer
  • Why do you need to put your phone on airplane mode.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!