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
Which option is used in emails to inform the recipient that they should exercise discretion in accordance with sharing the conte
Kay [80]
Priority levels hehe good luck!
5 0
3 years ago
What some one ask me if i am more of hardware or software person, what is that mean?
balu736 [363]

Answer: Any person or people asking about someone being a hardware or software person displays that they are questioning about the computer knowledge of the person and his/her interest.

The interest can be regarding software tools for programming, designing ,  etc or hardware device like troubleshooting, assembling the computer parts ,etc.

The person persisting good knowledge about software programming language and software is diverted towards software side .The person who likes to deal with hardware parts of the computer system is hardware-oriented person.

7 0
3 years ago
1. What is memory mapped I/O?
anzhelika [568]

Answer:

Memory-mapped I/O and port-mapped I/O are two complementary methods of performing input/output between the central processing unit and peripheral devices in a computer. An alternative approach is using dedicated I/O processors, commonly known as channels on mainframe computers, which execute their own instructions.

5 0
3 years ago
What's is flow chart?
TEA [102]

Answer: A flowchart is a graphical representation of decisions and their results mapped out in individual shapes.

Explanation:

These shapes were first developed by Herman Goldstine and John von Neumann in the 1940s.

Flowcharts can provide a step-by-step diagram for mapping out complex situations, such as programming code or troubleshooting problems with a computer.

4 0
3 years ago
How many bits are required to store the text of the number 150 in ascii?
kaheart [24]
The correct answer of the given question above would be 24 BITS. The number of bits that are required to store the text of the number 150 in ASCII would be 24 bits. ASCII means American Standard <span>Code for Information Interchange. Hope this answer helps. </span>
7 0
3 years ago
Read 2 more answers
Other questions:
  • Helppppppppppppppppppp
    11·1 answer
  • .When an argument is passed ______________, the called method can access and modify the caller’s original data directly.
    8·1 answer
  • Why should ERP architecture include a discussion on organizational structure, business processes, and people, instead of just in
    5·1 answer
  • An anagram is a word or a phrase made by transposing the letters of another word or phrase; for example, "parliament" is an anag
    7·1 answer
  • I have to write this in Java, but i've never even learned it before and i'm completely lost
    12·1 answer
  • Write a Bare Bones program that takes as input two variables X and Y. (Again, assume these values are set before your program be
    10·2 answers
  • 4. What are the ethical issues of using password cracker and recovery tools? Are there any limitations, policies, or regulations
    5·1 answer
  • 2. ¿Cuáles de los siguientes Software son lenguajes de Programación?
    10·1 answer
  • Which of the following does not represent the function of a Variable? Variables store data in memory; this data has limited use
    8·1 answer
  • _____ describes the layout of the screen. Block-based, Interface, Editor, Player
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!