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
erastova [34]
3 years ago
6

The function below takes two string parameters: sentence is a string containing a series of words separated by whitespace and le

tter is a string containing a single lower case letter. Complete the function to return a string containing one of the words in sentence that contains letter (in either upper case or lower case). Your code should return the word with its capitalization in the original sentence. If there are multiple words in sentence that contain letter, you can return any of them. student.py
Engineering
1 answer:
Eddi Din [679]3 years ago
4 0

Answer:

def extract_word_with_given_letter(sentence, letter):

   words = sentence.split()

   for word in words:

       if letter in word.lower():

           return word

   return ""

# Testing the function here. ignore/remove the code below if not required

print(extract_word_with_given_letter('hello HOW are you?', 'w'))

print(extract_word_with_given_letter('hello how are you?', 'w'))

You might be interested in
An Ideal gas is being heated in a circular duct as while flowing over an electric heater of 130 kW. The diameter of duct is 500
Assoli18 [71]

Answer: The exit temperature of the gas in deg C is 32^{o}C.

Explanation:

The given data is as follows.

C_{p} = 1000 J/kg K,   R = 500 J/kg K = 0.5 kJ/kg K (as 1 kJ = 1000 J)

P_{1} = 100 kPa,     V_{1} = 15 m^{3}/s

T_{1} = 27^{o}C = (27 + 273) K = 300 K

We know that for an ideal gas the mass flow rate will be calculated as follows.

     P_{1}V_{1} = mRT_{1}

or,         m = \frac{P_{1}V_{1}}{RT_{1}}

                = \frac{100 \times 15}{0.5 \times 300}  

                = 10 kg/s

Now, according to the steady flow energy equation:

mh_{1} + Q = mh_{2} + W

h_{1} + \frac{Q}{m} = h_{2} + \frac{W}{m}

C_{p}T_{1} - \frac{80}{10} = C_{p}T_{2} - \frac{130}{10}

(T_{2} - T_{1})C_{p} = \frac{130 - 80}{10}

(T_{2} - T_{1}) = 5 K

T_{2} = 5 K + 300 K

T_{2} = 305 K

           = (305 K - 273 K)

           = 32^{o}C

Therefore, we can conclude that the exit temperature of the gas in deg C is 32^{o}C.

8 0
3 years ago
Drivers education - Unit 3
melamori03 [73]

The following scenarios are pertinent to driving conditions that one may encounter. See the following rules of driving.

<h3>What do you do when the car is forced into the guardrail?</h3>

Best response:

  • I'll keep my hands on the wheel and slow down gradually.
  • The reason I keep my hands on the steering wheel is to avoid losing control.
  • This will allow me to slowly back away from the guard rail.
  • The next phase is to gradually return to the fast lane.
  • Slamming on the brakes at this moment would result in a collision with the car behind.

Scenario 2: When driving on a wet road and the car begins to slide

Best response:

  • It is not advised to accelerate.
  • Pumping the brakes is not recommended.
  • Even lightly depressing and holding down the brake pedal is not recommended.
  • The best thing to do is take one foot off the gas pedal.
  • There should be no severe twists at this time.

Scenario 3: When you are in slow traffic and you hear the siren of an ambulance behind

Best response:

  • The best thing to do at this moment is to go to the right side of the lane and come to a complete stop.
  • This helps to keep the patient in the ambulance alive.
  • It also provide a clear path for the ambulance.
  • Moving to the left is NOT recommended.
  • This will exacerbate the situation. If there is no place to park on the right shoulder of the road, it is preferable to stay in the lane.

Learn more about rules of driving. at;

brainly.com/question/8384066

#SPJ1

4 0
1 year ago
Consider casting a concrete driveway 40 feet long, 12 feet wide and 6 in. thick. The proportions of the mix by weight are given
Akimi4 [234]

Answer:

Weight of cement = 10968 lb

Weight of sand = 18105.9 lb

Weight of gravel = 28203.55 lb

Weight of water = 5484 lb

Explanation:

Given:

Entrained air = 7.5%

Length, L = 40 ft

Width,w = 12 ft

thickness,b= 6 inch, convert to ft = 6/12 = 0.5 ft

Specific gravity of sand = 2.60

Specific gravity of gravel = 2.70

The volume will be:

40 * 12 * 0.5 = 240 ft³

We need to find the dry volume of concrete.

Dry volume = wet volume * 1.54 (concrete)

Dry volume will be = 240 * 1.54 = 360ft³

Due to the 7% entarained air content, the required volume will be:

V = 360 * (1 - 0.07)

V = 334.8 ft³

At a ratio of 1:2:3 for cement, sand, and gravel respectively, we have:

Total of ratio = 1+2+3 = 6

Their respective volume will be =

Volume of cement = \frac{1}{6}*334.8 = 55.8 ft^3

Volume of sand = \frac{2}{6}*334.8 = 111.6 ft^3

Volume of gravel = \frac{3}{6}*334.8 = 167.4 ft^3

To find the pounds needed the driveway, we have:

Weight = volume *specific gravity * density of water

Specific gravity of cement = 3.15

Weight of cement =

55.8 * 3.15 * 62.4 = 10968 pounds

Weight of sand =

111.6 * 2.60 * 62.4 = 18105.9 lb

Weight of gravel =

167.4 * 2.7 * 62.4 = 28203.55 lb

Given water to cement ratio of 0.50

Weight of water = 0.5 of weight of cement

= 1/2 * 10968 = 5484 lb

4 0
3 years ago
Two flat plates, separated by a space of 4 mm, are moving relative to each other at a velocity of 5 m/sec. The space between the
xenn [34]

Answer:

0.008

Explanation:

From the question, the parameters given are:

Velocity V = 5 m/s

Pressure = 10 pa

But pressure = F/A

10 = F/A

F = 10A

Substitute all the parameters into the formula below

Coefficient of viscosity (η) = F × r /[AV]

Where

F = tangential force,

r = distance between layers,

A = Area, and

V = velocity

(η) = 10A × 0.004 /[A × 5]

The A will cancel out

(η) = 10 × 0.004 /[5]

(η) = 0.04 /5

(η) = 0.008

Therefore, the coefficient of viscosity of the fluid is 0.008

5 0
2 years ago
How will you maintain the orderliness of your storage area 2pts?​
fiasKO [112]

Explanation:

Label and group products. One would think that a general cleanup would be the first step, but no, it's not. ...Clean up the area. ...Put up demarcation lines. ...Stack properly. ...Keep the aisles, paths and ramps clear. ...Have all the safety signs in place.

4 0
2 years ago
Other questions:
  • In order to build a skyscraper Builders, Inc. hires 400 construction workers and 50 managers. Builders, Inc. represents A entrep
    8·1 answer
  • During an office party, an office worker claims that a can of cold beer on his table warmed up to 20oC by picking up energy from
    13·1 answer
  • 2 Consider airflow over a plate surface maintained at a temperature of 220°C. The temperature profile of the airflow is given as
    13·1 answer
  • A two-phase mixture of water and steam with a quality of 0.63 and T = 300F expands isothermally until only saturated vapor rema
    7·1 answer
  • Suppose that we have a 1000 pF parallel-plate capacitor with air dielectric charged to 1000 V. The capacitors terminals are open
    13·1 answer
  • Consider a single crystal of nickel oriented such that a tensile stress is applied along a [001] direction. If slip occurs on a
    6·1 answer
  • Yes I’m very cool I promise.
    15·1 answer
  • Cual es el costo del kwh
    8·1 answer
  • A heating system must maintain the interior of a building at TH = 20 °C when the outside temperature is TC = 2 °C. If the rate o
    10·1 answer
  • In your role, you are responsible for making sure that delivery trucks depart from the building on time. When a truck arrives la
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!