answer.
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]
2 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]2 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
Sea level is the average level of the sea between high and low tide. It is used as a reference point for measuring elevation, or
SSSSS [86.1K]

Answer:

-8 and 735

Explanation:

Since the sea is a body of water (fluid) it takes the same properties as a fluid does which means filling an area and finding a leveled point. This is why we use the sea as a starting elevation point for Earth's land and it is given a numerical value of 0. Since it starts at 0 any land above Sea Level is in the positives while land below Sea Level is in the negatives. Therefore Since New Orleans is 8 feet below sea level its numerical value elevation is -8. The highest point in Chicago is 735 feet above sea level which makes its numerical value 735

6 0
2 years ago
Read 2 more answers
The Spinning Jenny reduced the number of workers necessary to _______. a.remove cotton seeds from fibers b.pump water from the m
bazaltina [42]

The answer is D: Turn yarn into cloth.

During the industrial revolution, a number of new inventions in the textile industry greatly impacted this industry. However, it was the invention of the Spinning Jenny that is credited a lot. It helped move the textile industry from homes to factories and made wool spinning easier and faster. This invention, however, impacted the labor workforce. It reduced the amount of work needed to produce yarn. One worker was able to work 8 or more spools at once and rose to 120 due to technological advancements.

5 0
2 years ago
Which of the following represents the bus topology? Multiple Choice All devices are connected to a central device, called a hub.
Yanka [14]

Answer: All devices are connected to a central cable or backbone.

Explanation:

"All devices are connected to a central cable or backbone". Bus Topology refers to a logical or physical network's design. Bus Topology is also the network setup for a LAN (Local Area Network) nodes connected to a "backbone" or cable. The Bus setup connects every single computer and network to a single cable. Among others, the type of cable implemented for bus topology is usually a coaxial cable.

3 0
2 years ago
A(n) ______of the audio or video clip makes the content easily accessible to people with hearing disabilities.
defon

subtitles

hope that helped you

7 0
2 years ago
Read 2 more answers
Alice is adding a chart in a spreadsheet. Which option will allow you her to give the chart a suitable title and subtitle?
Anon25 [30]

Chart elements is the answer.


8 0
2 years ago
Read 2 more answers
Other questions:
  • Betsy recently assumed an information security role for a hospital located in the United States. What compliance regulation appl
    6·1 answer
  • Which of the following facts determines how often a nonroot bridge or switch sends an 802.1D STP Hello BPDU message?
    14·1 answer
  • Which situation best describes the prosumer effect?
    7·1 answer
  • The attack in which the attacker sends a forged packet with the same source IP address and destination IP address in which the v
    10·1 answer
  • Printers produce _____ output. Displays produce _____ output. A _____ is an audio output device that converts text to speech. Ma
    11·1 answer
  • 1.the following code example would print the data type of x, what data type would that be?
    12·1 answer
  • Explain the history of computing of mechanical era
    14·2 answers
  • Please can someone help me answer this question.
    11·1 answer
  • A credit card company receives numerous phone calls throughout the day from customers reporting fraud and billing disputes. Most
    10·1 answer
  • 4.2 Code Practice: Question 2
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!