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
Flip-flops are normally used for all of the following applications, except ________. logic gates data storage frequency division
SpyIntel [72]

Flip-flops are normally used for all of the following applications, except  logic gates.

<h3>What are Flip flops?</h3>

Flip flops are known to be tools that are used for counting. They come in different ranges.

Note that Flip flops are one that can be seen on counters, storage registers, and others and as such, Flip-flops are normally used for all of the following applications, except  logic gates.

Learn more about  Flip flops from

brainly.com/question/4237777

#SPJ1

6 0
1 year ago
An old refrigerator consumes 247 W of power. Assuming that the refrigerator operates for 19 hours everyday, what is the annual o
german

Answer:

The annual operating cost of the refrigerator is $102.78.

Explanation:

Power consumed by the refrigerator = 247 W = 247/1000 = 0.247 kW

Daily operation of the refrigerator = 19 hours

Annual operation of the refrigerator = 365 × 19 = 6,935 hours

Annual energy consumed = 0.247 kW × 6,935 hours = 1712.945 kWh

1 kWh of electricity cost $0.06

1712.945 kWh will cost 1712.945 × $0.06 = $102.78

Annual operating cost = $102.78

6 0
3 years ago
Read 2 more answers
Why is the lubrication system of an internal combustion engine equipped with an oil filter?
Ierofanga [76]

Answer:

to filter out any impurities such as metal shavings in the oil

6 0
3 years ago
In casting experiments performed using a certain alloy and type of sand mold, it took 170 sec for a cube-shaped casting to solid
poizon [28]

Answer:

Answer for the question is : Solidification time will be same i.e. 170. See attached file for explanation.

Explanation:

Download pdf
7 0
3 years ago
Read 2 more answers
Which best describes the body in terms of simple machines?
alex41 [277]

Answer:B

Explanation:

5 0
3 years ago
Other questions:
  • 1. A pipeline constructed of carbon steel failed after 3 years of operation. On examination it was found that the wall thickness
    13·1 answer
  • The heat flux through a 1-mm thick layer of skin is 1.05 x 104 W/m2. The temperature at the inside surface is 37°C and the tempe
    8·1 answer
  • In a right triangle, the square of the length of one side is equal to the sum of the squares of the lengths of the other two sid
    10·1 answer
  • A converging - diverging frictionless nozzle is used to accelerate an airstream emanating from a large chamber. The nozzle has a
    15·2 answers
  • A binary liquid system exhibits LLE at 25°C. Determine from each of the following sets of miscibility data estimates for paramet
    10·1 answer
  • Cryogenic liquid storage. Liquid oxygen is stored in a thin-walled spherical container, 96 cm in diameter, which is further encl
    10·1 answer
  • Fill in the blank to output the quotient of dividing 100 by 42. print (100______42)​
    8·1 answer
  • Can someone please help me?
    11·2 answers
  • Explain how you would solve for total resistance in a parallel circuit versus a series circuit. How would you apply and solve fo
    10·1 answer
  • in the multiple pipe system shown below, which of the following is true concerning the linear system?.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!