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
Which one of the following is a list of devices from least efficient to most efficient
Sergeu [11.5K]

Answer:

(A)-Light-Bulb, Automobile Engine, Power Plant, Electric Motor

Explanation:

To get the least efficient to the most efficient the chart below explains how to the get it

Incandescent light bulb-5%

Florescent light bulb-20%

Electric motor-90%

Power plant-35%

Automobile engine-25%

Home oil furnace-80%

4 0
3 years ago
Ma puteti ajuta cu un argument de 2 pagini despre inlocuirea garniturii de etansare de pe pistonul etrierului de franare la un a
Nitella [24]

Answer:

can you translate

Explanation:

what Is that?

4 0
2 years ago
Products that are in the process of being manufactured but are not yet complete are called:
vazorg [7]

Answer:

Those products are generally called Work in Process WIP

Explanation:

Work in process (WIP), or work in progress (WIP), goods in process, or in-process inventory in a manufacturing industry/company refer to the company's partially finished goods waiting for completion and eventual sale or the value of these items.

These items are either just being produced or require further processing (like purification, separation, packaging or handling) in a queue or a buffer storage.

6 0
3 years ago
A contractor is planning on including several skylights in each unit of a residential development. What type of worker would she
Sladkaya [172]

Answer:

Glazier

Explanation:

Glaziers are workers who specializes in cutting and installation of glass works.

They work with glass in various surfaces and settings, such as cutting and installing windows and doors, skylights, storefronts, display cases, mirrors, facades, interior walls, etc.

Thus, the type of worker the contractor will hire for this project is a Glazier

8 0
3 years ago
Energy.
alexandr402 [8]

Answer:

modern vehicles are made to crunch up a little bit so they that absorbe some of the impact instead of you

Explanation:

8 0
3 years ago
Other questions:
  • 6
    5·1 answer
  • So far in your lifetime, about how much garbage have you contributed
    12·1 answer
  • Give the approximate temperature at which creep deformation becomes an important consideration for each of the following metals:
    5·1 answer
  • Why do organisms differ in their methods of reproduction?
    5·2 answers
  • Which of these credit building options do you personally think is the easiest method that you can see yourself doing? Explain yo
    8·1 answer
  • Anything you want to do in Hootsuite can be found in the ________, with the main workspace in the _________?
    15·1 answer
  • 1. You should
    11·2 answers
  • सत्य से अधिक उपयोगी एवं आज्ञापालन से श्रेष्ठ क्या है ?<br>answer fast plz​
    9·1 answer
  • How can feeding plant crops to animals be considered an efficient use of those crops?
    6·1 answer
  • can anyone help me with this please.i have the current and pf for branch 1 and 2 but cant figure out the total current, pf and a
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!