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
1. True/False The Pressure Relief valve maintains the minimum pressure in the hydraulic circuit​
elena55 [62]
Yeah it’s true. Good luck!!
3 0
3 years ago
What are the inputs, outputs and side effects of a PSP?
Kipish [7]

Answer:

Side effects - sudden loss of balance/ repeated falls

Outputs - sever sickness and could me factual

Inputs/corrections of this- medications and experimental treatments to help slow the process of deterioration

5 0
3 years ago
True or false. Part of the mission of the NTSB is to determine the probable cause of an accident
eimsori [14]

uniform

welcome 2 Ghana African state western region

6 0
3 years ago
Which of the following activities will allow an engineer to determine that a building's design is sound?
zhannawk [14.2K]
Please add more details because I don’t know if you are using a book or passage, therefore I cannot help you unless you add more detail
3 0
4 years ago
A_____ transducer is a device that can convert an electronic controller output signal into a standard pneumatic output. A. pneum
makkiz [27]

Answer:

The correct answer is

option C. current to pneumatic (V/P)

Explanation:

A current to pneumatic controller is  basically used to receive an electronic signal from a controller and converts it further into a standard pneumatic output signal which is further used to operate a positioner or control valve. These devices are reliable, robust and accurate.

Though Voltage and current to pressure transducers are collectively called as electro pneumatic tranducers and the only electronic feature to control output pressure in them is the coil.

6 0
3 years ago
Other questions:
  • What are the causes of kickback on a table-saw?
    13·1 answer
  • A steam pipe passes through a chemical plant, where wind passes in cross-flow over the outside of the pipe. The steam is saturat
    13·1 answer
  • Two parts are to be assembled in a way that if one part fails, the entire assembly fails. Each of the parts have undergone exten
    15·1 answer
  • The guy wires AB and AC are attached to the top of the transmission tower. The tension in cable AB is 8.7 kN. Determine the requ
    8·1 answer
  • Pointssss 100 and brainliest :)
    5·1 answer
  • Which of these people is an engineer?
    13·1 answer
  • I wuv little space :)
    8·1 answer
  • Excessive looseness in steering and suspension components can cause _____
    13·1 answer
  • 2. It is a measuring instrument used to record the amount of
    15·1 answer
  • ABS system is necessary?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!