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 are the 5 major forest types?
Nataly [62]

Answer:

1. Equatorial Evergreen or Rainforest

2. Tropical forest

3. Mediterranean forest

4. Temperate broad-leaved forest

5. Warm temperate forest

Explanation:

4 0
4 years ago
Read 2 more answers
calculate the magnitude of the force acting on the pin at D. Pin C is fixed in DE and bears against the smooth slot in the trian
Olenka [21]

Answer:

hello your question lacks the required diagram attached below is the diagram

answer : 58.47 N

Explanation:

The magnitude of the force acting on the Pin D

Fd = \sqrt{Dx^2 + Dy^2}

    = \sqrt{16.80^2 + 56^2}

    = 58.465 N

Dx = 16.80 N

Dy = 56 N

hello attached below is the detailed solution

8 0
3 years ago
Which of these cars traveled faster during time interval <br> please show solution
Mazyrski [523]

Answer:

I think D is correct

Explanation:

C is decreasing function, probably worst

A is arctan -> in radian, the rate of increasing is very slow-> second worst

B(14) = ln(9*14) = 4.8

D(14) = sqrt(8+14^2)=14.2

3 0
3 years ago
What is the magnitude of the maximum stress that exist at the tip of an internal crack having a radius of curvature of 1.9 x 10-
Hitman42 [59]

Answer:

2800 [MPa]

Explanation:

In fracture mechanics, whenever a crack has the shape of a hole, and the stress is perpendicular to the orientation of such, we can use a simple formula to calculate the maximum stress at the crack tip

\sigma_{m} = 2 \sigma_{p} (\frac{l_{c}}{r_{c}})^{0.5}

Where \sigma_{m} is the magnitude of he maximum stress at the tip of the crack, \sigma_{p} is the magnitude of the tensile stress, l_{c} is 1/2 the length of the internal crack, and r_{c} is the radius of curvature of the crack.

We have:

r_{c}=1.9*10^{-4} [mm]

l_{c}=3.8*10^{-2} [mm]

\sigma_{c}=140 [MPa]

We replace:

\sigma_{m} = 2*(140 [MPa])*(\frac{\frac{3.8*10^{-2} [mm]}{2}}{1.9*10^{-4} [mm]})^{0.5}

We get:

\sigma_{m} = 2*(140 [MPa])*(\frac{\frac{3.8*10^{-2} [mm]}{2}}{1.9*10^{-4} [mm]})^{0.5}=2800 [MPa]

5 0
3 years ago
A section of highway has a free-flow speed of 55 mph and a capacity of 3300 veh/hr. In a given hour, 2100 vehicles were counted
alexira [117]

Answer:

Space mean speed = 44 mi/h

Explanation:

Using Greenshield's linear model

q = Uf ( D - D^{2}/Dj )

qcap = capacity flow that gives Dcap

Dcap = Dj/2

qcap = Uf. Dj/4

Where

U = space mean speed

Uf =  free flow speed

D = density

Dj = jam density

now,

Dj = 4 × 3300/55

    = 240v/h

q = Dj ( U - U^{2}/Uf)

2100 = 240 ( U - U^{2}/55)

Solve for U

U = 44m/h

5 0
3 years ago
Other questions:
  • 3. An isolated system has an initial temperature of 30oC. It is then placed on top of a Bunsen burner whose temperature is 70oC
    10·1 answer
  • You are reassembling a gearbox. The output
    9·1 answer
  • Draw the schematics of stress versus strain plot of a metal, and illustrate, (a) modulus of elasticity, (b) yield strength, (c)
    12·1 answer
  • A three-point bending test was performed on an aluminum oxide specimen having a circular cross section of radius 5.0 mm (0.20 in
    13·1 answer
  • Which of the following is NOT a true statement about construction drawings?
    5·1 answer
  • Which of these methods is likely to make a product design more suitable for mass production?
    8·1 answer
  • THE MASS FOR OBJECT 1 is 107.01 grams what is the objects force in Newton’s answer please
    10·1 answer
  • If it is desired to lay off a distance of 10,000' with a total error of no more than ± 0.30 ft. If a 100' tape is used and the
    8·1 answer
  • Which of the following statements about static electricity is true?
    6·1 answer
  • A semiconductor is a material that can carry an electric current between a ______and an insulator
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!