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
Rom4ik [11]
2 years ago
14

Question 29: Returns a string based on input string The function below takes a single string parameter: input_string. If the inp

ut contains the lowercase letter z, return the string 'has the letter z'. Otherwise, return the string 'not worthwhile'. contain.py 1. def string contains(input_string): Que Best s Availat Awarde Restore original file Save & Grade Save only Atta No attach Attacha Attache
Engineering
1 answer:
kirill [66]2 years ago
8 0

Answer:

Two Python codes are explained for the problem. Modify as appropriate

Explanation:

<u>CODE 1:</u>

def string_contains(input_string): # called function

if(input_string.__contains__('z')): # Check input_string contains 'z'

print('has the letter z.') # print input_string contains 'z'

else:

print('not worthwhile.') # print if input_string not contains 'z'

input_string = input('Please enter the string: ') # ACeept string from user

string_contains(input_string) # calling function where we pass input_string as actual parameter

<u>CODE 2:</u>

def string_contains(input_string):

   for x in input_string:

       if x=='z':

           return 'has the letter z'

   return 'not worthwhile'

You might be interested in
Michelle is the general manager of a power plant. This morning, she will meet with city officials to discuss environmental issue
Irina-Kira [14]

Answer:

interpersonal.

Explanation:

Out of all the activities performed by Michelle, three activities involves the interpersonal skills.

1. Meeting with city officials

2. Meeting with section managers

3. Handling the complaint filed by an employee

All these activities involves interpersonal skills. Hence, we can say that she had spent her most of the day by using the interpersonal skills.

6 0
2 years ago
The air contained in a room loses heat to the surroundings at a rate of 50 kJ/min while work is supplied to the room by computer
Artemon [7]

Answer:

net amount of energy change of the air in the room during a 30-min period = 660KJ

Explanation:

The detailed calculation is as shown in the attached file.

4 0
2 years ago
Read 2 more answers
A six- lane freeway ( three lanes in each direction) in a scenic area has a measured free- flow speed of 55 mi/ h. The peak- hou
Novosadov [1.4K]

Answer:

0.867

Explanation:

The driver population factor (f_{p})can be estimated using the equation below:

f_{p} = \frac{V}{PHF*N*f_{HV}*v_{p}}

The value of the heavy vehicle factor (f_{HV}) is determined below:

The values of the E_{T} = 2 and E_{R} = 3 are gotten from the tables for the RVs, trucks and buses upgrades for passenger-car equivalents. Therefore:

f_{HV} = 1/[1+0.08(2-1)+0.06(3-1)] = 1/[1+0.08+0.12] = 1/1.2 = 0.833

Furthermore, the vp is taken as 2250 pc/(h*In) from the table of LOS criteria for lane freeway using the 15 minutes flow rate. Therefore:

f_{p} = 3900/[0.8*3*0.833*2250] = 3900/4498.2 = 0.867

6 0
2 years ago
A thermal energy storage unit consists of a large rectangular channel, which is well insulated on its outer surface and encloses
yaroslaw [1]

Answer:

the temperature of the aluminum at this time is 456.25° C

Explanation:

Given that:

width w of the aluminium slab = 0.05 m

the initial temperature T_1 = 25° C

T{\infty} =600^0C

h = 100 W/m²

The properties of Aluminium at temperature of 600° C by considering the conditions for which the storage unit is charged; we have ;

density ρ = 2702 kg/m³

thermal conductivity k = 231 W/m.K

Specific heat c = 1033 J/Kg.K

Let's first find the Biot Number Bi which can be expressed by the equation:

Bi = \dfrac{hL_c}{k} \\ \\ Bi = \dfrac{h \dfrac{w}{2}}{k}

Bi = \dfrac{hL_c}{k} \\ \\ Bi = \dfrac{100 \times \dfrac{0.05}{2}}{231}

Bi = \dfrac{2.5}{231}

Bi = 0.0108

The time constant value \tau_t is :

\tau_t = \dfrac{pL_cc}{h} \\ \\ \tau_t = \dfrac{p \dfrac{w}{2}c}{h}

\tau_t = \dfrac{2702* \dfrac{0.05}{2}*1033}{100}

\tau_t = \dfrac{2702* 0.025*1033}{100}

\tau_t = 697.79

Considering Lumped capacitance analysis since value for Bi is less than 1

Then;

Q= (pVc)\theta_1 [1-e^{\dfrac {-t}{ \tau_1}}]

where;

Q = -\Delta E _{st} which correlates with the change in the internal energy of the solid.

So;

Q= (pVc)\theta_1 [1-e^{\dfrac {-t}{ \tau_1}}]= -\Delta E _{st}

The maximum value for the change in the internal energy of the solid  is :

(pVc)\theta_1 = -\Delta E _{st}max

By equating the two previous equation together ; we have:

\dfrac{-\Delta E _{st}}{\Delta E _{st}{max}}= \dfrac{  (pVc)\theta_1 [1-e^{\dfrac {-t}{ \tau_1}}]} { (pVc)\theta_1}

Similarly; we need to understand that the ratio of the energy storage to the maximum possible energy storage = 0.75

Thus;

0.75=  [1-e^{\dfrac {-t}{ \tau_1}}]}

So;

0.75=  [1-e^{\dfrac {-t}{ 697.79}}]}

1-0.75=  [e^{\dfrac {-t}{ 697.79}}]}

0.25 =  e^{\dfrac {-t}{ 697.79}}

In(0.25) =  {\dfrac {-t}{ 697.79}}

-1.386294361= \dfrac{-t}{697.79}

t = 1.386294361 × 697.79

t = 967.34 s

Finally; the temperature of Aluminium is determined as follows;

\dfrac{T - T _{\infty}}{T_1-T_{\infty}}= e ^ {\dfrac{-t}{\tau_t}}

\dfrac{T - 600}{25-600}= e ^ {\dfrac{-967.34}{697.79}

\dfrac{T - 600}{25-600}= 0.25

\dfrac{T - 600}{-575}= 0.25

T - 600 = -575 × 0.25

T - 600 = -143.75

T = -143.75 + 600

T = 456.25° C

Hence; the temperature of the aluminum at this time is 456.25° C

3 0
2 years ago
A plane wall of thickness 2L = 60 mm and thermal conductivity k= 5W/m.K experiences uniform volumetric heat generation at a rate
aniked [119]

Answer:

Explanation:

A plane wall of thickness 2L=40 mm and thermal conductivity k=5W/m⋅Kk=5W/m⋅K experiences uniform volumetric heat generation at a rateq  

˙

q

q

˙

​  

, while convection heat transfer occurs at both of its surfaces (x=-L, +L), each of which is exposed to a fluid of temperature T∞=20∘CT  

∞

​  

=20  

∘

C. Under steady-state conditions, the temperature distribution in the wall is of the form T(x)=a+bx+cx2T(x)=a+bx+cx  

2

 where a=82.0∘C,b=−210∘C/m,c=−2×104C/m2a=82.0  

∘

C,b=−210  

∘

C/m,c=−2×10  

4

C/m  

2

, and x is in meters. The origin of the x-coordinate is at the midplane of the wall. (a) Sketch the temperature distribution and identify significant physical features. (b) What is the volumetric rate of heat generation q in the wall? (c) Determine the surface heat fluxes, q

′′

x

(−L)q  

x

′′

​  

(−L) and q

′′

x

(+L)q  

x

′′

​  

(+L). How are these fluxes related to the heat generation rate? (d) What are the convection coefficients for the surfaces at x=-L and x=+L? (e) Obtain an expression for the heat flux distribution q

′′

x

(x)q  

x

′′

​  

(x). Is the heat flux zero at any location? Explain any significant features of the distribution. (f) If the source of the heat generation is suddenly deactivated (q=0), what is the rate of change of energy stored in the wall at this instant? (g) What temperature will the wall eventually reach with q=0? How much energy must be removed by the fluid per unit area of the wall (J/m2)(J/m  

2

) to reach this state? The density and specific heat of the wall material are 2600kg/m32600kg/m  

3

 and 800J/kg⋅K800J/kg⋅K, respectively.

6 0
2 years ago
Other questions:
  • Radioactive wastes are temporarily stored in a spherical container, the center of which is buried a distance of 10 m below the e
    13·1 answer
  • An optical mouse originally cost $31.85. Before it was removed from the store, it underwent the following changes in price. 27%
    8·2 answers
  • Air in a 10 ft3 cylinder is initially at a pressure of 10 atm and a temperature of 330 K. The cylinder is to be emptied by openi
    10·2 answers
  • Air is compressed adiabatically from p1 1 bar, T1 300 K to p2 15 bar, v2 0.1227 m3 /kg. The air is then cooled at constant volum
    13·1 answer
  • Water (cp = 4180 J/kg·°C) enters the 2.5 cm internal diameter tube of a double-pipe counter-flow heat exchanger at 17°C at a rat
    7·1 answer
  • An equation used to evaluate vacuum filtration is Q = ΔpA2 α(VRw + ARf) , Where Q ≐ L3/T is the filtrate volume flow rate, Δp ≐
    13·1 answer
  • simple power system consists of a dc generator connected to a load center via a transmission line. The load power is 100 kW. The
    11·1 answer
  • 11 Notează, în caiet, trăsăturile personajelor ce se pot
    13·1 answer
  • The BARO sensor informs the PCM about changes in weather and ____________________.
    14·1 answer
  • 140-character statement that completes this sentence: I pledge to not text and drive because...
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!