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 does this work for
Anastaziya [24]

Answer:

it allows your dash board to light up you MPH RPM and all the other numbers on the spadomter

Explanat

8 0
3 years ago
A stationary gas-turbine power plant operates on a simple ideal Brayton cycle with air as the working fluid. The air enters the
ololo11 [35]

Answer:

A) W' = 15680 KW

B) W' = 17113.87 KW

Explanation:

We are given;

Temperature at state 1; T1 = 290 K

Temperature at state 3; T3 = 1100 K

Rate of heat transfer; Q_in = 35000 kJ/s = 35000 Kw

Pressure of air into compressor; P_c = 95 kPa

Pressure of air into turbine; P_t = 760 kPa

A) The power assuming constant specific heats at room temperature is gotten from;

W' = [1 - ((T4 - T1)/(T3 - T2))] × Q_in

Now, we don't have T4 and T2 but they can be gotten from;

T4 = [T3 × (r_p)^((1 - k)/k)]

T2 = [T1 × (r_p)^((k - 1)/k)]

r_p = P_t/P_c

r_p = 760/95

r_p = 8

Also,k which is specific heat capacity of air has a constant value of 1.4

Thus;

Plugging in the relevant values, we have;

T4 = [(1100 × (8^((1 - 1.4)/1.4)]

T4 = 607.25 K

T2 = [290 × (8^((1.4 - 1)/1.4)]

T2 = 525.32 K

Thus;

W' = [1 - ((607.25 - 290)/(1100 - 525.32))] × 35000

W' = 0.448 × 35000

W' = 15680 KW

B) The power accounting for the variation of specific heats with temperature is given by;

W' = [1 - ((h4 - h1)/(h3 - h2))] × Q_in

From the table attached, we have the following;

At temperature of 607.25 K and by interpolation; h4 = 614.64 KJ/K

At T3 = 1100 K, h3 = 1161.07 KJ/K

At T1 = 290 K, h1 = 290.16 KJ/K

At T2 = 525.32 K, and by interpolation, h2 = 526.12 KJ/K

Thus;

W' = [1 - ((614.64 - 290.16)/(1161.07 - 526.12))] × 35000

W' = 17113.87 KW

4 0
3 years ago
Using Java..
uysha [10]

Answer:

The source code files for this question have been attached to this response.

Please download it and go through each of the class files.

The codes contain explanatory comments explaining important segments of the codes, kindly go through these comments.

Download java
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> java </span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> java </span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> java </span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> java </span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> java </span>
7 0
3 years ago
Technician A says a solenoid is not used on modern automobiles. Technician B says fuel injectors and starter motor solenoids are
julia-pushkina [17]

Answer:

ON THE BOTTOM

Explanation:

red cord plus black cord

5 0
3 years ago
Fill in the blank to correctly complete the statement below.
ZanzabumX [31]
Did not engineer cables factoring wind shear
4 0
3 years ago
Other questions:
  • What will happen in a wire drawing operation when the cross-sectional area has a reduction of 60% in a single pass?
    10·1 answer
  • Which best describes the body in terms of simple machines?
    6·1 answer
  • Lately, you have noticed some repetitive stress in your wrist. Which sign is most likely the cause of that stress and pain?
    7·1 answer
  • Often an attacker crafts e-mail attacks containing malware designed to take advantage of the curiosity or even greed of the reci
    14·1 answer
  • Water discharging into a 10-m-wide rectangular horizontal channel from a sluice gate is observed to have undergone a hydraulic j
    12·1 answer
  • Q.17) A 50-acre catchment containing cropland is converted ot a Qatar mail
    13·1 answer
  • Compute the solution to x + 2x + 2x = 0 for Xo = 0 mm, vo = 1 mm/s and write down the closed-form expression for the response.
    8·1 answer
  • Lagest organs of the human body
    6·2 answers
  • Please help been stuck on this for a couple minutes
    5·1 answer
  • Which of the following sensors is used to provide suspension control module with feedback regarding vehicle cornering​ forces?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!