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]
4 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]4 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
One of the following is correct Absolute pressure= Atmospheric pressure - Gauge pressure b)- Gauge pressure=Absolute pressure +
n200080 [17]

Answer:

(d)

Explanation:

Absolute pressure= Atmospheric pressure+Gauge pressure

hence from this equation we can clearly say that option (A) and (b) is not right.

absolute temperature cannot be negative.

so, option (d) is right.

according to law of mass conservation mass can neither be created nor be destroyed which define control mass i.e. mass in a control mass system is constant

7 0
3 years ago
Martha has been running a small business for two years. She now seeks additional investment to finance her business. She has fou
Dafna11 [192]

Answer:

The correct option is B) Balance Sheet

Explanation:

A Balance Sheet offers a description of a company's obligations, assets, and investments as well as net income over a given span of time such as a period of 6 months or 12 months, for instance.

Also known as the Statement of Financial Position, it contains sufficient information for investors and business owners to determine the company's financial performance in that period as well as to compare the performance of that company with industry norms or competition.

Cheers

8 0
3 years ago
Saturated steam coming off the turbine of a steam power plant at 40°C condenses on the outside of a 3-cm-outer-diameter, 35-m-lo
Marina86 [1]

Answer:

93.57 KJ/s

Explanation:

Rate of heat transfer from the steam to the cooling water = mass rate  ×  Heat of vaporization of water at 40 °C

H vaporization of water 40 °C  at saturation pressure = 2406.0 kJ / Kg

rate of heat transfer = 2406.0 kJ / Kg × 140 Kg / ( 60 × 60s) = 93.57 KJ/s

5 0
3 years ago
How have railways developed to date?
frozen [14]

Railways development is constantly growing as it is changing from diesel or fuel powered railways to electric powered railways.

<h3>How was railways developed?</h3>

The first working railway steam locomotive was known to be created by the United Kingdom in the year 1804 through  man known as Richard Trevithick who was a British engineer.

Note therefore that railway is changing from  high-pressure steam to electric powered railways.

Learn more about railways from

brainly.com/question/11433327

#SPJ1

7 0
2 years ago
What are four things that mechanisms can change?
Minchanka [31]

Answer:

thanks

Explanation:

8 0
4 years ago
Other questions:
  • Consider a refrigerator that consumes 320 W of electric power when it is running. If the refrigerator runs only one quarter of t
    10·2 answers
  • Your employer has the ability to protect you from cave-ins and other hazards by using adequately-designed protection systems in
    13·1 answer
  • In a manufacturing process, long aluminum rods of square cross section with d = 25 mm are cooled from an initial temperature of
    12·2 answers
  • You are ordering steel cable for a 250 foot long zip-line you are building in your back yard. The cable can be ordered in diamet
    6·2 answers
  • What is reciprocity?
    14·2 answers
  • What is the base unit in standard measurement
    13·2 answers
  • If you stretch a rubber hose and pluck it, you can observe a pulse traveling up and down the hose. What happens to the speed of
    10·1 answer
  • Pt 1. Amanda lifts a crate into the back of her truck. She exerts a force of 200N distance of 1.2m. Calculate the amount of work
    9·1 answer
  • Which traits are common in all four career pathways of the Information Technology field? Check all that apply.
    5·2 answers
  • How to find density ? because the answer 764.526kg/m^3
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!