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
Rom4ik [11]
3 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]3 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
What is the mass of a brass axle that has a volume of 0.318 cm? ​
NeX [460]

Answer:

2.7g

Explanation:

the mass of a brass axle that has a volume of 0.318 cm is 2.7g.

8 0
3 years ago
Can i use two shunts and one meter
Lyrx [107]

Answer:

no

Explanation:

6 0
3 years ago
Read 2 more answers
A tank with a volume of 8 m3 containing 4 m3 of 20% (by volume) NaOH solution is to be purged by adding pure water at a rate of
lawyer [7]

Answer:

The time necessary to purge 95% of the NaOH is 0.38 h

Explanation:

Given:

vfpure water(i) = 3 m³/h

vNaOH = 4 m³

xNaOH = 0.2

vfpure water(f) = 2 m³/h

pwater = 1000 kg/m³

pNaOH = 1220 kg/m³

The mass flow rate of the water is = 3 * 1000 = 3000 kg/h

The mass of NaOH in the solution is = 0.2 * 4 * 1220 = 976 kg

When the 95% of the NaOH is purged, thus the NaOH in outlet is = 0.95 * 976 = 927.2 kg

The volume of NaOH in outlet after time is = 927.2/1220 = 0.76 m³

The time required to purge the 95% of the NaOH is = 0.76/2 = 0.38 h

4 0
3 years ago
Dear sir i want to ask something about the solution of my question?
Eva8 [605]
No you may not ask the question
3 0
3 years ago
Small droplets of carbon tetrachloride at 68 °F are formed with a spray nozzle. If the average diameter of the droplets is 200 u
Licemer1 [7]

Answer:

the difference in pressure between the inside and outside of the droplets is 538 Pa

Explanation:

given data

temperature = 68 °F

average diameter = 200 µm

to find out

what is the difference in pressure between the inside and outside of the droplets

solution

we know here surface tension of carbon tetra chloride at 68 °F is get from table 1.6 physical properties of liquid that is

σ = 2.69 × 10^{-2} N/m

so average radius = \frac{diameter}{2} =  100 µm = 100 ×10^{-6} m

now here we know relation between pressure difference and surface tension

so we can derive difference pressure as

2π×σ×r = Δp×π×r²    .....................1

here r is radius and  Δp pressure difference and σ surface tension

Δp = \frac{2 \sigma }{r}    

put here value

Δp = \frac{2*2.69*10^{-2}}{100*10^{-6}}  

Δp = 538

so the difference in pressure between the inside and outside of the droplets is 538 Pa

7 0
3 years ago
Other questions:
  • Which solution causes cells to shrink
    13·1 answer
  • A gas contained within a piston-cylinder undergoes the follow change in states: Process 1: Constant volume from p1 = 1 bar V1 =
    9·1 answer
  • The amount of time an activity can be delayed and yet not delay the project is termed:_________
    14·1 answer
  • For a steel alloy it has been determined that a carburizing heat treatment of 14 h duration at 809°C will raise the carbon conce
    13·1 answer
  • In a flow over a flat plate, the Stanton number is 0.005: What is the approximate friction factor for this flow a)- 0.01 b)- 0.0
    8·1 answer
  • The convection heat transfer coefficient for a clothed person standing in moving air is expressed as h 5 14.8V0.69 for 0.15 , V
    12·2 answers
  • A magnesium oxide component must not fail when a tensile stress of 14 MPa is applied. Determine the maximum allowable surface cr
    8·1 answer
  • What forced induction device is more efficient?
    8·2 answers
  • Is the science of measurement
    13·2 answers
  • Most goals
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!