subject

#Write a function called string_finder. string_finder should #take two parameters: a target string and a search string. #The function will look for the search string within the #target string. # #The function should return a string representing where in #the target string the search string was found: # # - If search string is at the very beginning of target # string, then return "Beginning". For example: # string_finder("Georgia Tech", "Georgia") -> "Beginning" # # - If search string is at the very end of target string, # then return "End". For example: # string_finder("Georgia Tech", "Tech") -> "End" # # - If search string is in target string but not at the # very beginning or very end, then return "Middle. For # example: # string_finder("Georgia Tech", "gia") -> "Middle" # # - If search string is not in target string at all, then # return "Not found". For example: # string_finder("Georgia Tech", "Idaho") -> "Not found" # #Assume that we're only interested in the first instance #of the search string if it appears multiple times in the #target string, and that search string is definitely #shorter than target string. # #Hint: Don't be surprised if you find that the "End" case #is the toughest! You'll need to look at the lengths of #both the target string and the search string. #Write your function here!

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:00, amyeileen
11. is the ability to understand how another person is feeling. a. authority b. sympathy c. empathy d. taking a stand
Answers: 1
image
Computers and Technology, 22.06.2019 16:30, mesposito
Technician a says that a dry sump system uses no oil storage sump under the engine. technician b says that a wet sump system uses no oil storage sump under the engine. who is correct?
Answers: 3
image
Computers and Technology, 23.06.2019 09:30, jason9394
Facial expressions and gestures are examples of messages.
Answers: 3
image
Computers and Technology, 23.06.2019 16:10, alexis9658
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3
You know the right answer?
#Write a function called string_finder. string_finder should #take two parameters: a target string a...

Questions in other subjects:

Konu
Mathematics, 29.12.2019 17:31