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
arlik [135]
3 years ago
13

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.
Computers and Technology
1 answer:
postnew [5]3 years ago
4 0

Answer:

Python 3 code used below

Explanation:

def word_extraction(sentence,letter)

  //splitting the sentence into individual words

  words=sentence.split()

  for word in words:

//This will take care of the word in lower

      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
Write Python code to save the data to a MongoDB collection:Import json module to parse JSON dataImport MongoClient from pymongo
Zigmanuir [339]

Answer:

Explanation:

The objective of this task is to compute a program that involves the usage of Python code to save the data to MongoDB and to query  the database.

Due to the error that occur which makes me to be unable to submit this answer, I've created a word document instead and the attached file can be found below.

Thanks!

Download docx
8 0
3 years ago
How is photography like jazz music?
Wewaii [24]
LIke jazz, photography has fallings that are being implied to the pictures such as the jazz music. These felling or as there commonly know as soul can make great music and even HD pictures in photography.
7 0
3 years ago
When keying, keep fingers curved and upright over the home keys.<br> False<br> True
Dmitry [639]

Answer:

This is true.

Explanation:

I think everyone was taught to to type correctly sometime in school or at home. It helps you proficiently type. But most people don't use the Home Room Key Technique. Most use the "Chicken peck"

3 0
3 years ago
I need help with my homework
lukranit [14]

Answer:

C is not equal to the other two.

Explanation:

A = 35

B = 35

C is actually equal to 36.

8 0
2 years ago
The query [windows], English (US) has two dominant interpretations: the operating system and the windows in a home
Nadusha1986 [10]

Answer:

True

Explanation:

When the word windows is google, there are two basic interpretations: operating system and the windows in a home. This is the two dominant interpretation can be given to the word windows when queried.

6 0
3 years ago
Other questions:
  • It's time for you to schedule a dental checkup. The responsible thing to do is to ___
    11·1 answer
  • What are 2 ways that technology can negatively impact the environment.
    8·2 answers
  • Choose a developing country and give 3 reasons why it is a developing country ​
    15·1 answer
  • Customizable diagrams, including List, Process, and Cycle diagrams, are built into Word and can be found in
    7·1 answer
  • Where do charts get the data series names?
    14·1 answer
  • What is a hardware device that allows you to connect to several computers and other devices to a single internet connection
    6·1 answer
  • How does Shakespeare immediately introduce Tybalt as a menacing character?
    9·1 answer
  • Choose all that apply.
    5·2 answers
  • Mrs. Schlair has an annual salary of $96,402.<br> a. What would her semimonthly salary be?
    9·1 answer
  • When locating and correcting accessibility issues for a document, you would click what first?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!