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
What social impact did the gunpowder have on society?
olga2289 [7]
It had a huge impact people could use other things than bows and arrows to fight in wars.
8 0
3 years ago
Colours can be contrasting if<br>​
abruzzese [7]

.....If the colors are from different segments of the color wheel.

3 0
2 years ago
2) What is the value stored in the variable z by the statements below?
Dmitriy789 [7]

Answer:

7

Explanation:

Because the q.length is a inbuilt function in the programming which used to get the length of the array. In the array, there are 7 values are store. Therefore, the size 7 store in the variable z.

For example:

int[] array={1,2};

int x = array.length;

the answer of above code is 2, because the elements present in the array is 2.

 

5 0
3 years ago
The director of HR realizes that the KSAs currently used for hiring entry-level engineers are outdated. In order to establish wh
Vaselesa [24]

Answer:

Job analysis

Explanation:

The HR should preferably use job analysis.

6 0
3 years ago
Kiara is using her software's graphic formats to create a line graph. As she
Ad libitum [116K]

Correct the data she entered , and the software will adjust the graph -apex

5 0
3 years ago
Read 2 more answers
Other questions:
  • A compound document contains _______ from different applications.
    12·2 answers
  • Do you think engineers have to adapt their original plans during the construction of systems or products? Why might they?
    6·1 answer
  • Plugging in a cable is a good troubleshooting technique. <br> True or false
    5·1 answer
  • When tcp/ip was developed, the host table concept was expanded into a hierarchical name system for matching computer names and n
    5·1 answer
  • In step 2 of the mail merge process you must be prepared to
    6·2 answers
  • How many water bottles must be collected to win?
    8·2 answers
  • Many computer magazines and Web sites present comparisons of several DBMSs. Find one such DBMS comparison article and compare th
    10·1 answer
  • Use the Law of Sines to solve the triangle. Round your answers to two decimal places.
    6·1 answer
  • For this assignment, you will write a program that calculates gross and net revenue for a movie theater. Consider the following
    15·1 answer
  • How to change the microsoft word pages to black background
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!