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
HACTEHA [7]
2 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]2 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
A 100 kmol/h stream that is 97 mole% carbon tetrachloride (CCL) and 3% carbon disulfide (CS2) is to be recovered from the bottom
Ugo [173]

Answer: oop

Explanation:oop

7 0
2 years ago
A pipe of 0.3 m outer diameter at a temperature of 160°C is insulated with a material having a thermal conductivity of k = 0.055
Alekssandra [29.7K]

Answer:

Q=0.95 W/m

Explanation:

Given that

Outer diameter = 0.3 m

Thermal conductivity of material

K= 0.055(1+2.8\times 10^{-3}T)\frac{W}{mK}

So the mean conductivity

K_m=0.055\left ( 1+2.8\times 10^{-3}T_m \right )

T_m=\dfrac{160+273+40+273}{2}

T_m=373 K

K_m=0.055\left ( 1+2.8\times 10^{-3}\times 373 \right )

K_m=0.112 \frac{W}{mK}

So heat conduction through cylinder

Q=kA\dfrac{\Delta T}{L}

Q=0.112\times \pi \times 0.15^2\times 120

Q=0.95 W/m

4 0
2 years ago
The Driver of a vehicle on a level road determined that she could increase her speed from rest to 50 mi/h in 12.8 sec and from r
Ket [755]

Answer:

maximum acceleration is  1.746 m/s²

Explanation:

given data

\frac{du}{dt} = (α) - (β) ×(u(t))  

speed = rest to 50 mi/h = 22.352 m/s

time =  12.8 sec

speed = rest to 65 mi/h = 29.05 m/s

time =  19.8 sec

solution

we get here maximum acceleration of vehicle that is

maximum acceleration = \frac{\frac{du}{dt} }{t}

maximum acceleration = \frac{v1-V2}{t}    ...............1

put here value

maximum acceleration = \frac{22.352-0}{12.8}

maximum acceleration = 1.746 m/s²

and for another vehicle

maximum acceleration = \frac{29.05-0}{19.8}

maximum acceleration = 1.46 m/s²

so here maximum acceleration is  1.746 m/s²

6 0
2 years ago
A spherical hot-air balloon is initially filled with air at 120 kPa and 20°C with an initial diameter of 5 m. Air enters this ba
adoni [48]

Answer:

time is 17.43 min

Explanation:

given data

initial diameter = 5 m

velocity = 3 m/s

final diameter = 17 m

solution

we will apply here change in change in volume equation that is express as

ΔV = \frac{4}{3} \pi * (rf)^3 - \frac{4}{3} \pi * (ri)^3    .............1

here ΔV is change in volume and rf is final radius and ri is initial radius

ΔV = \frac{4}{3} \pi * (8.5)^3 - \frac{4}{3} \pi * (2.5)^3

ΔV = 2507 m³

so

Q = velocity × Area

Q = 3 × π ×(0.5)² = 2.356 m³/s

and

change in time is express as

Δt = \frac{\Delta V}{Q}

Δt = \frac{2507}{2.356}

Δt = 1046 sec

so change in time is 17.43 min

8 0
2 years ago
Plot the data as impact energy versus temperature: (b) Determine a ductile-to-brittle transition temperature as the temperature
Shkiper50 [21]

Question:

The following tabulated data were gathered from a series of Charpy impact tests on a commercial low-carbon steel alloy.

Temperature(∘C)50403020100-10-20-30-40Impact energy (J)76767158382314951.5

(a) Plot the data as impact energy versus temperature.

(b) Determine a ductile-to-brittle transition temperature as the temperature corresponding to the average of the maximum and minimum impact energies.

(c) Determine a ductile-to-brittle transition temperature as the temperature at which the impact energy is 20 J.

Answer:

a)  see the attached graph

b) max E = 76 and Min E =1.53 average = 77.5/2 = 38.75 J

this corresponds to about 10° C

c ) at E = 20 J temperature is about -2°C

8 0
2 years ago
Read 2 more answers
Other questions:
  • A solid cylinder is concentric with a straight pipe. The cylinder is 0.5 m long and has an outside diameter of 8 cm. The pipe ha
    10·1 answer
  • Consider a plane composite wall that is composed of two materials of thermal conductivities kA 0.1 W/mK and kB 0.04 W/mK and thi
    14·1 answer
  • A long aluminum wire of diameter 3 mm is extruded at a temperature of 280°C. The wire is subjected to cross air flow at 20°C at
    9·1 answer
  • If the electric field just outside a thin conducting sheet is equal to 1.5 N/C, determine the surface charge density on the cond
    9·1 answer
  • What properties should the head of a carpenter’s hammer possess? How would you manufacture a hammer head?
    6·1 answer
  • A steady tensile load of 5.00kN is applied to a square bar, 12mm on a side and having a length of 1.65m. compute the stress in t
    13·1 answer
  • The uniform beam is supported by two rods AB and CD that have crosssectional areas of 10 mm2 and 15 mm2 , respectively. Determin
    5·1 answer
  • The Gill Art Gallery wishes to maintain data on their customers, artists and paintings. They may have several paintings by each
    7·1 answer
  • A distância entre duas retas reversas é a medida de um segmento orientado que *?
    6·1 answer
  • Sharon is designing a house in an area that receives a lot of rainfall all year. Which material should she use to stick the wood
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!