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
What is the benefit of theories? they are easily disproven they are written by famous people they were applying every circumstan
OlgaM077 [116]

Answer:

A scientific theory is an explanation of an aspect of the natural world and universe that has been repeatedly tested and verified in accordance with the scientific method, using accepted protocols of observation, measurement, and evaluation of results. Where possible, theories are tested under controlled conditions in an experiment. In circumstances not amenable to experimental testing, theories are evaluated through principles of abductive reasoning. Established scientific theories have withstood rigorous scrutiny and embody scientific knowledge.

A scientific theory differs from a scientific fact or scientific law in that a theory explains "why" or "how": a fact is a simple, basic observation, whereas a law is a statement (often a mathematical equation) about a relationship between facts. For example, Newton’s Law of Gravity is a mathematical equation that can be used to predict the attraction between bodies, but it is not a theory to explain how gravity works. Stephen Jay Gould wrote that "...facts and theories are different things, not rungs in a hierarchy of increasing certainty. Facts are the world's data. Theories are structures of ideas that explain and interpret facts.

mark me as brainlist

3 0
2 years ago
What are the conditions for sheet generator to build up its voltage?
MA_775_DIABLO [31]

Answer:

There are six conditions

1. Poles should contain some residual flux.

2. Field and armature winding must be correctly connected so that initial mmm adds residual flux.

3. Resistance of field winding must be less than critical resistance.

4. Speed of prime mover of generator must be above critical speed.

5. Generator must be on load.

6. Brushes must have proper contact with commutators.

Explanation:

3 0
2 years ago
I have a molten Ni-Cu alloy with 60 wt%Ni. (ii) I cool it down to a temperature where I have both solid and liquid phases. At th
SIZIF [17.4K]

Answer:

The percentage of the remaining alloy would become solid is 20%

Explanation:

Melting point of Cu = 1085°C

Melting point of Ni = 1455°C

At 1200°C, there is a 30% liquid and 70% solid, the weight percentage of Ni in alloy is the same that percentage of solid, then, that weight percentage is 70%.

The Ni-Cu alloy with 60% Ni and 40% Cu, and if we have the temperature of alloy > temperature of Ni > temperature of Cu, we have the follow:

60% Ni (liquid) and 40% Cu (liquid) at temperature of alloy

At solid phase with a temperature of alloy and 50% solid Cu and 50% liquid Ni, we have the follow:

40% Cu + 10% Ni in liquid phase and 50% of Ni is in solid phase.

The percentage of remaining alloy in solid is equal to

Solid = (10/50) * 100 = 20%

4 0
3 years ago
Tech A says that the stoichiometric ratio is 14.7 gallons of air to 1 gallon of fuel. Tech B says it is 14.7 lb of air to 1 lb o
Degger [83]

The person that is correct as regards statement made about stoichiometric ratio is; <em><u>Tech B</u></em>

In air-fuel mixture, when there is a mix air and fuel in the ideal amounts to make an engine to run efficiently,the ideal ratio of air to fuel is known Stoichiometric ratio.

This stoichiometric ratio is the comparison between the weight of the air relative to the weight of the fuel that it has been mixed with.

Now, weight is in lb and as such, tech B is correct because his ratio is 14.7lb to 1 lb.

Read more at; brainly.com/question/16971089

3 0
2 years ago
A hypothetical metal has an orthorhombic unit cell for which the a, b, and c lattice parameters are 0.413 nm, 0.665 nm, and 0.87
Inessa [10]

Answer:

atomic radius  R = 0.157 nm

metal atomic weight = 72.27 g/mol

Explanation:

given data

parameters a =  0.413 nm

parameters b = 0.665 nm

parameters c =  0.876 nm

atomic packing factor = 0.536

density = 3.99 g/cm³

to find out

atomic radius and  atomic weight

solution

we apply  here atomic packing factor (x) that is

atomic packing factor (x) = \frac{volume(sphere)}{volume(unit\ cell)}  ..................1

put here value we get

atomic packing factor = \frac{8*(4/3)*\pi R^3}{3*a*b*c}

R = (\frac{3(x)(abc)}{32\pi })^{1/3}

R =  (\frac{3(0.536)(0.413*0.665*0.876)}{32\pi })^{1/3}

atomic radius  R = 0.157 nm

and

now we get here metal atomic weight that is

metal atomic weight = \frac{\rho (abc)(N_A)}{no\ of\ atom}   ....................2

metal atomic weight = \frac{3.99 (0.413*0.665*0.876)(6.023*10^{23})}{8}  

metal atomic weight = 72.27 g/mol

6 0
3 years ago
Other questions:
  • Name 3 ways in which robots have improved since the Ebola outbreak.
    11·1 answer
  • The air contained in a room loses heat to the surroundings at a rate of 60 kJ/min while work is supplied to the room by computer
    7·2 answers
  • Refrigerant-134a enters a diffuser steadily as saturated vapor at 600 kPa with a velocity of 160 m/s, and it leaves at 700 kPa a
    10·2 answers
  • . Carly's Catering provides meals for parties and special events. In Chapter 2, you wrote an application that prompts the user f
    10·1 answer
  • By efficiency, we generally mean the ratio of the desired output to the required input. That is, efficiency is a measure of what
    7·1 answer
  • A benefit to using the medium the author used in "Great Rock and Roll
    12·2 answers
  • Why charles babbage is known as father of computer explain <br>​
    12·1 answer
  • 1. In order to minimize hazards, what should you do before starting a job
    10·2 answers
  • How do you identify all sensors, functions, and where we can use them?
    12·1 answer
  • If welding is being done in the vertical position, the torch should have a travel angle of?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!