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
Use the map to answer the question.
djverab [1.8K]

Answer:

Captain falcon

Explanation:

7 0
2 years ago
Info security:
il63 [147K]

Answer:

True

Explanation:

Dual home host - it is referred to as the firewall that is incorporated with two or more networks. out of these two networks, one is assigned to the internal network and the other is for the network. The main purpose of the dual-homed host is to ensure that no Internet protocol traffic is induced between both the network.

The most simple example of a dual-homed host is a computing motherboard that is provided with two network interfaces.

7 0
3 years ago
It is given that 50 kg/sec of air at 288.2k is iesntropically compressed from 1 to 12 atm. Assuming a calorically perfect gas, d
denis23 [38]

The exit temperature is 586.18K and  compressor input power is 14973.53kW

Data;

  • Mass = 50kg/s
  • T = 288.2K
  • P1 = 1atm
  • P2 = 12 atm

<h3>Exit Temperature </h3>

The exit temperature of the gas can be calculated isentropically as

\frac{T_2}{T_1} = (\frac{P_2}{P_1})^\frac{y-1}{y}\\ y = 1.4\\ C_p= 1.005 Kj/kg.K\\

Let's substitute the values into the formula

\frac{T_2}{T_1} = (\frac{P_2}{P_1})^\frac{y-1}{y} \\\frac{T_2}{288.2} = (\frac{12}{1})^\frac{1.4-1}{1.4} \\ T_2 = 586.18K

The exit temperature is 586.18K

<h3>The Compressor input power</h3>

The compressor input power is calculated as

P= mC_p(T_2-T_1)\\P = 50*1.005*(586.18-288.2)\\P= 14973.53kW

The compressor input power is 14973.53kW

Learn more on exit temperature and compressor input power here;

brainly.com/question/16699941

brainly.com/question/10121263

6 0
2 years ago
Can i eat unhealthy while i’m drinking green tea for weight loss ?
Zina [86]

Answer:I don't think it's a better idea to eat unhealthy food while having green tea because it will act as a strumbling rock in your attempt of getting weight loss.

Explanation:I don't say you have to mark my ans as brainliest but if ypu think it has really helped you plz don't forget to thank me...

6 0
3 years ago
Read 2 more answers
Compute the number of games using the formula of “SINGLE ROUND ROBIN” and plot the games in a table:
Bogdan [553]

Answer:

N=27.02

Explanation:

3 0
2 years ago
Other questions:
  • If a ball is dropped from a height​ (H) its velocity will increase until it hits the ground​ (assuming that aerodynamic drag due
    5·1 answer
  • The following laboratory tests are performed on aggregate samples:a. Specific gravity and absorptionb. Soundnessc. Sieve analysi
    13·1 answer
  • The ratio of the weight of a substance to the weight of equal volume of water is known as a) Density b) specific gravity c) spec
    8·1 answer
  • write an interface downloadable that has a method "geturl" that returns the url of a downloadable object
    5·1 answer
  • Nitrogen enters a steady-flow heat exchanger at 150 kPa, 10°C, and 100 m/s, and it receives heat as it flows through it. Nitroge
    15·1 answer
  • Which scientist was famous for his laws on gravity?
    10·2 answers
  • 12 times the square root of 8737
    13·1 answer
  • • Differentiate between laboratory and industrial reactors​
    11·1 answer
  • What does Enter key do?
    10·1 answer
  • The centre of the circumstancribing circle of a triangle can be found by using the
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!