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
zzz [600]
3 years ago
10

Define a function below, filter_out_strs, which takes a single argument of type list. Complete the function so that it returns a

list that contains only the non-strings from the original list. It is acceptable to return an empty list if there are only strings in the original list. This question uses the filter pattern discussed in lecture.
Computers and Technology
1 answer:
Afina-wow [57]3 years ago
8 0

Answer:

Explanation:

The following code is written in Python and is a simple function that removes all of the type String elements within the list that has been passed as an argument. Then finally, prints out the list and returns it to the user.

def filter_out_str(list):

   for x in list:

       if type(x) == type(" "):

           list.remove(x)

   print(list)

   return list

You might be interested in
CHALLENGE ACTIVITY 4.2.2: Basic while loop with user input. Write an expression that executes the loop while the user enters a n
tino4ka555 [31]

Answer:

#include<iostream>

using namespace std;

int main()

{

int userNum;

userNum=9;

while(userNum>=0)

{

  cout<<"Body"<<endl;

  cin>>userNum;

}

cout<<"Done"<<endl;

return 0;

}

Explanation:

  • Use the userNum >= 0 expression that executes the loop while the user enters a number greater than or equal to 0.
  • Print the userNum inside the while loop.
3 0
3 years ago
2.4 Code Practice: Question 2
klasskru [66]

num = float(input("Enter a number: "))

num1 = int(num)

print(num - num1)

I hope this helps!

8 0
2 years ago
Some smartphones use ______ text, where you press one key on the keyboard or keypad for each letter in a word, and software on t
Oksanka [162]

Answer:

The answer is "predictive".

Explanation:

The statement lacks some details, which can be answered by the choice of the question:

A. Presumptive .

B. suggestive .

C. interpretive.

D. predictive.

Predictive text is considered to be auto-correct text as well. It is an input technique, which allows people to type words onto a smartphone throughout the text field. It's focused on both the significance of the words and letters in the message, and certain choices were wrong, which can be defined as follows:

  • Option B and Option D both were wrong because it provides the synonyms of the words.
  • In option C It is wrong because it is a text version.

5 0
3 years ago
What is an example of Big Data?
Y_Kistochka [10]

Answer:

providing real-time data feeds on millions of people with wearable devices

Explanation:

6 0
3 years ago
Which slot type would you install a video card in to get the best performance?
erma4kov [3.2K]
It really is hard to say because there are many slots and we do not know what your teacher is teaching. I have seen a lot of teachers teaching out of date material. With that said, here is a list from best to worst.

PCI Express x16
PCI Express x1
AGP
PCI

This is list is based on greatest to least and base on the bandwidth read and write speed.

6 0
3 years ago
Other questions:
  • Write a MIPS assembly language program that prompts for a user to enter how many floating point numbers to enter, then prompts t
    10·1 answer
  • Two or more computers that transfer information between computers are called a
    7·1 answer
  • Which option should you select to ignore all tracked changes in a document
    6·1 answer
  • Swiping up with three fingers on mac os x launches what?
    8·1 answer
  • A Windows application which demands a lot of raw processing power to execute repetitive complex calculations is a good candidate
    5·1 answer
  • Write a SELECT statement that uses an aggregate window function to get the total amount of each order. Return these columns: The
    13·1 answer
  • The purpose of multivariate analysis in index construction is to discover the simultaneous interaction of the items to determine
    12·1 answer
  • What symbol indicates that material has been copyrighted?
    8·2 answers
  • Why is it important to think about the programming language to use?
    6·1 answer
  • Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!