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
Radda [10]
3 years ago
15

The function below takes a single string parameter: sentence. Complete the function to return everything but the middle 10 chara

cters of the string. You can assume that the parameter always has at least twelve characters and is always an even number of characters long. Hint: To find the middle of the string, you can half the length of the string (floor division). Then slice out 5 less than the middle to 5 more than the middle.
Computers and Technology
1 answer:
dolphi86 [110]3 years ago
7 0

Answer:

def get_middle_ten(sentence):

   ind = (len(sentence) - 12) // 2

   return sentence[ind:ind + 12]

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

print(get_middle_twelve("abcdefghijkl"))

print(get_middle_twelve("abcdefghijklmnopqr"))

print(get_middle_twelve("abcdefghijklmnopqrst"))

You might be interested in
Windows server 2012 r2 includes hyper-v in which edition(s)?
SashulF [63]
<span>The Standard and Datacenter editions.</span>
7 0
3 years ago
Which statement regarding socializers is true?
allochka39001 [22]

Answer:

The answer is: they are comparable to suit of hearts

Explanation:

The answer is: they are comparable to suit of hearts

7 0
3 years ago
Read 2 more answers
Write F id the following is formatting tags, H for heading tags, S for structural tags, and SC if it belongs to a seperator/cont
Rina8888 [55]

Answer:

Here!

Hope this helps. Please mark brainliest!

6 0
2 years ago
A start-up is expanding overseas and spends an excessive amount of time on recruiting and hiring activities, hindering its abili
leva [86]
HCM is a word for Human Capital Management
6 0
3 years ago
You are trying to determine why a packet of data is not being correctly sent over the internet. You determine that the problem i
spayn [35]
Answer is A it has a false ip so that is why an error is happening therefore the answer would be A.
6 0
2 years ago
Read 2 more answers
Other questions:
  • Who usually signs a collection letter?
    15·2 answers
  • Write statementsto show how finding the length of a character array char [ ] differs from finding the length of a String object
    9·1 answer
  • Give sally sue specific suggestions on how she can improve her powerpoint skills
    5·1 answer
  • How to determine if the function f(x) = x^2 + 3 from real numbers to real numbers is Injective, surjective, or bijective
    13·1 answer
  • Emerson needs to tell his browser how to display a web page. Which tool will he use?
    8·2 answers
  • The company where Derek works has tasked him with setting up and securing a SOHO router. He wants to make sure the wireless netw
    7·1 answer
  • Which party controlled the White House and politics in the late 1800s, except for Grover
    6·2 answers
  • What can your employer do to protect you from overhead power lines?
    13·1 answer
  • A specialized output device for producing charts, maps, and very high-quality drawings is
    5·1 answer
  • The Western Siberian Plain is __________ in some places because it has poor natural draining systems.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!