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]
3 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]3 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
How do you think Beyoncé choreography has/will influence the future of dance?
kaheart [24]

Answer: So choreographers do have the same rights as songwriters over the dissemination of their  skill, prestige, acclaim, power, visibility, popularity, influence, and potential  Will she find beauty in her 2019 forays in to Broadway

Explanation:

7 0
3 years ago
Read 2 more answers
1. State three types of web protocols​
pav-90 [236]

Answer:

Types of Protocols

Transmission Control Protocol (TCP)

Internet Protocol (IP)

User Datagram Protocol (UDP)

Post office Protocol (POP)

Simple mail transport Protocol (SMTP)

File Transfer Protocol (FTP)

Hyper Text Transfer Protocol (HTTP)

Hyper Text Transfer Protocol Secure (HTTPS)

7 0
3 years ago
What are three settings that are available in the Properties dialog box of a message?
Volgvan

There are 3 types of dialog boxes: modeless, modal, and system modal. Modal dialog boxes are generally used inside a program, to display messages, and to set program parameters. Modal dialog boxes come to the front of the screen, and you may not use the program while the modal dialog box is open.

4 0
4 years ago
Read 2 more answers
How have productivity programs improved the professional lives of people? (check all that apply)
gtnhenbr [62]

Answer:

  • made it easier and less expensive to present information
  • made it easier and faster to communicate with others

Explanation:

productivity programs

productivity programs are designed and use for producing information easily and made it easier and faster to communicate with others

worksheets , charts , graphs , documents etc

MS office , Time management , projects management softwares are the example of  productivity programs

there are alot of tools which are designed to make conversation and communication more easy related to productivity program following are the example of tools

  • Microsoft Teams
  • slack
  • Zoom
  • Office 365
  • Poppulo
  • JIRA Cloud
  • Interact.
3 0
3 years ago
Read 2 more answers
What most distinguishes projects with a strong need for computer animation from projects without such a strong need?
dsp73
<span> Computer animation is the process used for generating animated images with computers. </span>It is also referred to as CGI (Computer-generated imagery or computer-generated imaging).
If you understand the basic film processes (editing, sound, continuity) you could make an animated film either by making one drawing after another, moving an object frame by frame in front of the camera, or using some animation software. However, when it comes to big project what most 
<span>distinguishes projects with a strong need for computer animation from projects without such a strong need is the size of the budget, because people that know the animation industry and work well should be additional included in the project and paid.</span>
8 0
4 years ago
Other questions:
  • Platon says, when taking a photo you should:<br> (Photography class)
    5·1 answer
  • All objects in an object-oriented program are instantiated (created) from a ____.
    12·1 answer
  • (Financial application: compound value) Suppose you save $100 each month into a savings account with the annual interest rate 5%
    8·1 answer
  • Based on the Pizza database you imported, complete the SQL statement below to add the column VIP to the customers table. The cus
    8·1 answer
  • A technician suspects a network card is not working. Which tool should the technician use to test the network card?
    8·1 answer
  • sara has just started using the Internet. She would like to be more efficient . In 3-4, give sara some advice about how to be mo
    5·1 answer
  • What are the three primary separation of concerns on the client-side of a dynamic web application? (Check all that apply)
    13·1 answer
  • How do i skip direct instruction on e2020?
    11·2 answers
  • If you want to display information from a database to someone who is not a user of the database, you will have to use:
    7·1 answer
  • An invisible path determining the way of travel from one place to another.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!