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
Big data refers to huge collections of data that are difficult to process, analyze, and manage using conventional data tools. It
Helga [31]

Answer:

3rd;mobile;velocity;NoSQL;out;shards;dynamic;schema-less;value;column;Hadoop;MapReduce.

Explanation:

Big data refers to huge collections of data that are difficult to process, analyze, and manage using conventional data tools. It is a core component of the 3rd platform, which also includes cloud computing, mobile devices, and social networking. The five Vs of big data are high volume, high velocity, diversified variety, unknown veracity, and low-density value. Although SQL and relational databases can be used for big datasets, a collection of alternative tools referred to as NoSQL has become popular. These tools work well when databases scale out (horizontally) and when databases are broken into subsets called shards. Modern database tools also handle dynamic scaling as devices are added when additional capacity is required. NoSQL tools are sometimes said to create schema-less databases, but they usually have some type of structure, though it may be more flexible than the relational model. A key-value data model provides each data element with a key. A column-oriented data model makes it easy to access data stored in similar fields, rather than in individual records. Two very popular NoSQL tools include Hadoop, which is a big data file system, and MapReduce which sends processing logic to the data, rather than bringing the data to the computer that performs the processing.

4 0
2 years ago
The top-down approach is an appropriate strategy for most
puteri [66]

Answer:

true

Explanation:

The Top-down approach is an approach to a problem that focuses on the big picture first before moving down into the specifics of the topic/problem. Therefore based on the information provided within the question it can be said that the statement being made is completely true. Since the interviewer using this approach starts with a broad topic and later goes into the details, it does allow them to be accustomed to the topic first.

8 0
3 years ago
Can someone tell me how to fix the keyboard on ipad?- its in the middle of my screen andd i dont know how to do it
mamaluj [8]

Answer:

Here

Explanation:

To move keyboard to bottom of screen, you just need to tap and hold the keyboard icon at the bottom-right corner of the keyboard, choose Dock option. To fix iPad keyboard in middle of screen, please tap and hold the keyboard icon, then choose Dock.Nov 5, 2020

5 0
2 years ago
Riodic Table
Ksenya-84 [330]

Answer:

riodic Table

A museum wants to store their valuable documents in cases that contain a gas that will protect the documents.

She should not choose one of the other gases because they are too

The museum director should choose

Explanation:

I didn't understand

8 0
3 years ago
The understanding of computer function?
Licemer1 [7]
A specific skill or work done and carried out by a computer in order to gain information
8 0
2 years ago
Other questions:
  • How can netiquette help you communicate when texting or instant messaging?
    6·1 answer
  • The birthday problem is as follows: given a group of n people in a room, what is the probability that two or more of them have t
    12·1 answer
  • Can change the tab colors of the worksheets in excel
    13·1 answer
  • DECIPHER AND SOLVE THIS<br><br> SCC:R<br> D<br> YJOTE VP=GPIMFRT
    15·1 answer
  • The sameNumber method checks to see if the number of words in the phrase, numwords, is the same number of words contained in the
    5·1 answer
  • Silas develops this algorithm to compute the calories burned for an activity for a given number of minutes and body weight: If t
    6·1 answer
  • Question 1
    8·1 answer
  • What are the specifications for a mine shaft headgear ​
    10·1 answer
  • a ____ is a window inside the word window that can remain open and visible while you work in a document.
    14·1 answer
  • Write a pseudocode for the logic of a program that accepts five numbers from a user and displays one of the following messages:-
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!