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
posledela
3 years ago
10

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.
Engineering
1 answer:
pychu [463]3 years ago
3 0

Answer:

def filter_only_certain_strings(data_list):

   new_list = []

   for data in data_list:

       # fix here. change >= to >  

       # because we want to return strings longer than 5 characters in length.

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

           new_list.append(data)

   return new_list

Explanation:

def filter_only_certain_strings(data_list):

   new_list = []

   for data in data_list:

       # fix here. change >= to >  

       # because we want to return strings longer than 5 characters in length.

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

           new_list.append(data)

   return new_list

You might be interested in
If a front gear had 24 teeth, and a rear gear has 12 teeth:
zubka84 [21]

Answer:

  4 times around

Explanation:

The total number of teeth involved will be the same for each gear. If the front gear is connected to the pedal and it goes around twice, then 2·24 = 48 teeth will have passed the reference point.

If the rear gear is attached to the wheel, and 48 teeth pass the reference point, then it will have made ...

  (48 teeth)/(12 teeth/turn) = 4 turns

4 0
2 years ago
Close to 16 billion pounds of ethylene glycol (EG) were produced in 2013. It previously ranked as the twenty-sixth most produced
bekas [8.4K]

Answer:

a) 0.684

b) 0.90

Explanation:

Catalyst

EO + W → EG

<u>a) calculate the conversion exiting the first reactor </u>

CAo = 16.1 / 2   mol/dm^3

Given that there are two stream one  contains 16.1 mol/dm^3 while the other contains   0.9 wt% catalyst

Vo = 7.24 dm^3/s

Vm = 800 gal = 3028 dm^3

hence Im = Vin/ Vo = (3028 dm^3) / (7.24dm^3/s) = 418.232 secs = 6.97 mins

next determine the value of conversion exiting the reactor ( Xai ) using the relation below

KIm = \frac{Xai}{1-Xai}  ------ ( 1 )

make Xai subject of the relation

Xai = KIm / 1 + KIm  ---  ( 2 )

<em>where : K = 0.311 ,  Im = 6.97   ( input values into equation 2 )</em>

Xai = 0.684

<u>B) calculate the conversion exiting the second reactor</u>

CA1 = CA0 ( 1 - Xai )

therefore CA1 = 2.5438 mol/dm^3

Vo = 7.24 dm^3/s

To determine the value of the conversion exiting the second reactor  ( Xa2 ) we will use the relation below

XA2 = ( Xai + Im K ) / ( Im K + 1 ) ----- ( 3 )

<em> where : Xai = 0.684 , Im = 6.97,  and K = 0.311  ( input values into equation 3 )</em>

XA2 = 0.90

<u />

<u />

<u />

4 0
3 years ago
How wold you classify the earliest examples of S.T.E.M discoveries provided in this lesson?
Gnoma [55]

Answer:

the answer is C

Explanation:

8 0
2 years ago
Let be a real-valued signal for which when . Amplitude modulation is preformed to produce the signal . A proposed demodulation t
densk [106]

Answer:

hello your question is incomplete attached below is the complete question

answer : attached below

Explanation:

let ; x(t)  be a real value signal for x ( jw ) = 0 , |w| > 200\pi

g(t) = x ( t ) sin ( 2000 \pi t )

x_{1} (t) = \frac{1}{2}  x(t)  sin ( 4000\pi t )

next we apply Fourier transform

attached below is the remaining part of the solution

6 0
3 years ago
True or false. Part of the mission of the NTSB is to determine the probable cause of an accident
eimsori [14]

uniform

welcome 2 Ghana African state western region

6 0
3 years ago
Other questions:
  • When you are configuring data deduplication, you must choose a usage type for the volume you are configuring. Which of the follo
    8·1 answer
  • Consider a step pn junction made of GaAs at T = 300 K. At zero bias, only 20% of the total depletion region width is in the p-si
    11·1 answer
  • What do machines require in order to work?
    12·1 answer
  • Give five examples of
    14·1 answer
  • Help me, iv been having problems with ads going in my phones storage files, what can i do to stop this?
    14·2 answers
  • Running ropes must be taken out of service if they have _____ broken wires in one strad in one lay
    15·2 answers
  • 3
    6·1 answer
  • I know this answer i just want too see if people know it too
    9·2 answers
  • Select the correct answer. Which of the following devices is a simple machine? A.
    9·2 answers
  • Technician A says that the definition of torque is how far the crankshaft twists in degrees.Technician B says that torque can re
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!