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

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

racters 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.
Engineering
1 answer:
ale4655 [162]3 years ago
4 0

Answer:

  1. def processString(sentence):
  2.    middle = len(sentence) // 2
  3.    output = sentence[0: middle - 5] + sentence[middle+5:]
  4.    return output
  5. print(processString("I have a dream"))

Explanation:

Create a function processString that take sentence as input paratemer (Line 1).

Next create a variable middle to hold the value of middle index of sentence string (Line 2)

Build the output string by slicing the input sentence from first character to character middle - 5th and from middle + 5th till the end of the string (Line 3).

Test the function using a sample sentence and we shall get the output "I am"

You might be interested in
What gives thrill in a roller coaster? High speed or Changing acceleration? Explain your answer.
iris [78.8K]

Answer:

They both work together in order to create a good experience for the passenger, but I think that the answer is changing acceleration because when  the rollercoaster changes acceleration it gives it speed.

Explanation:

I really hope this helps.

8 0
3 years ago
It is said that Archimedes discovered the buoyancy laws when asked by King Hiero of Syracuse to determine whether his new crown
sertanlavr [38]

Answer with Explanation:

The crown will be pure if it's specific gravity is 19.3

Now by definition of specific gravity it is the ratio between the weight of an object to the weight of water of equal volume

Since it is given that the weight of the crown is 11.8 N we need to find it's volume

Now According to Archimedes principle when the crown is immersed into water the water shall exert a force in upwards direction on the crown with a magnitude equaling to weight of the water displaced by the crown

Mathematically this is the difference between the weight of the crown in air and weight when immersed in water

Thus Buoyant force is F_{B}=11.8-10.9=0.9N

Now by Archimedes principle This force equals in magnitude to the weight of water of same volume as of the crown

Thus the specific gravity of the crown equals

S.G=\frac{11.8}{0.9}=13.11

As we see that the specific gravity of the crown material is less than that of pure gold hence we conclude that it is impure.  

4 0
4 years ago
The largest class of errors in software engineering can be attributed to _______.
Ilya [14]

Answer:

improper imput validation

Explanation:

6 0
2 years ago
A carpenter uses a hammer to strike a nail. Approximate the hammer's weight of 1.8lbs, as being concentrated at the head, and as
bija089 [108]

Answer:

The average force F exherted by the nail over the hammer is 178.4 lbf.

Explanation:

The force F exherted by the nail over the hammer is defined as:

F = |I|/Δt

Where I and Δt are the magnitude of the impact and the period of time respectively. We know that the impact can be calculated as the difference in momentum:

I = ΔP = Pf - Pi

Where Pf and Pi are the momentum after and before the impact. Recalling for the definition for momentum:

P = m.v  

Where m and v are the mass and the velocity of the body respectively. Notice that final hummer's momentum is zero due to the hammers de-acelerate to zero velocity. Then the momentum variation will be expressed as:

ΔP =  - Pi = -m.vi

The initial velocity is given as 50 mph and we will expressed in ft/s:

vi = 50 mph * 1.47 ft/s/mph = 73.3 ft/s

By multiplyng by the mass of 1.8 lbs, we obtain the impulse I:

|I|= |ΔP|= |-m.vi| = 1.8 lb  * 73.3 ft/s = 132 lb.ft/s

Dividing the impulse by a duration of 0.023 seconds, we finally find the force F:

F =  132 lb.ft/s / 0.023 s = 5740 lb.ft/s^2  

Expressing in lbf:

F = 5740 lb.ft/s^2 * 0.031 lbf/lb.ft/s^2  =  178.4 lbf

7 0
3 years ago
Cause and effect of global warming on animals essay
kobusy [5.1K]

A) Jason is correct because smaller wings can cut through air better.

6 0
4 years ago
Other questions:
  • A signalized intersection approach has an upgrade of 4%. The total width of the cross street at this intersection is 60 feet. Th
    15·1 answer
  • Why/how is a paperclip able to float on water?
    9·1 answer
  • A completely reversible heat pump produces heat ata rate of 300 kW to warm a house maintained at 24°C. Theexterior air, which is
    6·1 answer
  • Write a class declaration named Circle with a private member variable named radius. Write set and get functions to access the ra
    8·1 answer
  • You are hired as the investigators to identify the root cause and describe what should have occurred based on the following info
    9·1 answer
  • Quien mira WWE.<br>Respondan!​
    10·1 answer
  • List 6 different mechanisms in the Rube Goldberg cartoon and predict the purpose of each. Does the mechanism change speed, force
    11·1 answer
  • Some extremely hazardous materials used in welding operations include.
    12·1 answer
  • 1 UNREAD MESSAGE
    6·1 answer
  • What is the difference between mnemonic codes and machine codes?​
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!