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
Masja [62]
3 years ago
15

The function below takes a single string parameter: input_string. If the input contains the lowercase letter z, return the strin

g 'has the letter z'. Otherwise, return the string 'not worthwhile'.

Engineering
1 answer:
Whitepunk [10]3 years ago
4 0

Answer:

# string_contains function is defined with input_string

# as arguments

def string_contains(input_string):

   # if-statement that check if letter z is in input_string

   if 'z' in input_string:

       # it print"has the letter z" if it has z

       print("has the letter z")

   else:

       # else it print "not worthwhile"

       print("not worthwhile")

       

# string_contains function is called

string_contains("The animal is zebra")        

string_contains("learning is fun")

Explanation:

The code is written in Python and well commented.

Image of the output when the function is called is attached.

You might be interested in
How can I find the quotient of 27 divided 91.8
gayaneshka [121]
Step 1:
Start by setting it up with the divisor 8 on the left side and the dividend 27 on the right side like this:

8 ⟌ 2 7

Step 2:
The divisor (8) goes into the first digit of the dividend (2), 0 time(s). Therefore, put 0 on top:

0
8 ⟌ 2 7

Step 3:
Multiply the divisor by the result in the previous step (8 x 0 = 0) and write that answer below the dividend.

0
8 ⟌ 2 7
0

Step 4:
Subtract the result in the previous step from the first digit of the dividend (2 - 0 = 2) and write the answer below.

0
8 ⟌ 2 7
- 0
2

Step 5:
Move down the 2nd digit of the dividend (7) like this:

0
8 ⟌ 2 7
- 0
2 7

Step 6:
The divisor (8) goes into the bottom number (27), 3 time(s). Therefore, put 3 on top:

0 3
8 ⟌ 2 7
- 0
2 7

Step 7:
Multiply the divisor by the result in the previous step (8 x 3 = 24) and write that answer at the bottom:

0 3
8 ⟌ 2 7
- 0
2 7
2 4

Step 8:
Subtract the result in the previous step from the number written above it. (27 - 24 = 3) and write the answer at the bottom.

0 3
8 ⟌ 2 7
- 0
2 7
- 2 4
3

You are done, because there are no more digits to move down from the dividend.

The answer is the top number and the remainder is the bottom number.

Therefore, the answer to 27 divided by 8 calculated using Long Division is:

3
8 0
3 years ago
Each of the following activities are commonly performed during the implementation of the Database Life Cycle (DBLC). Fill in the
kicyunya [14]
Yessiree I agree with yu cause yu are right
4 0
3 years ago
What is the best countermeasure against social engineering?
Mkey [24]

Answer:

Hello Monk7294!

Answer:

Employee education

Explanation:

The most important countermeasure for social engineering is employee education. All the employees should be trained to keep confidential data safe. As a part of security education, organizations have to provide timely orientation about their security policy to new employees. The security policy should address the consequences of the breaches.

<em>- I Hope this helps Have an awesome day!</em>

<em>~ Chloe marcus <3</em>

3 0
3 years ago
ear shaft.3. Chapter 12 –Loading on Spur Gears: A 26-tooth pinion rotating at a uniform 1800 rpm meshes with a 55-tooth gear in
Mama L [17]

Answer:

The bending stress is 502.22 MPa

Explanation:

The diameter of the pinion is equal to:

d_{p} =mN_{p}

Where

m = module = 5

Np = number of teeth of pinion = 26

d_{p} =5*26=130mm = 0.13 m

The pitch line velocity is equal to:

V_{t} =\frac{d_{p}*2*\pi  *w_{p} }{120}

Where

wp = speed of the pinion = 1800 rpm

V_{t} =\frac{0.13*2*\pi *1800}{120} =12.25m/s

The factor B is equal to:

B=\frac{(12-Q_{v})^{2/3}  }{4} , if Q_{v} =10\\B=\frac{(12-10)^{2/3} }{4} =0.396

The factor A is equal to:

A = 50 + 56*(1 - B) = 50 + 56*(1-0.396) = 83.82

The dynamic factor is:

K_{v} =(\frac{A}{A+\sqrt{200V_{t} } } )^{B} \\K_{v}=(\frac{83.82}{83.82+\sqrt{200*12.25} } )^{0.396} =0.832

The geometry bending factor at 20°, the application factor Ka, load distribution factor Km, the size factor Ks, the rim thickness factor Kb and Ki the idler factor can be obtained from tables

JR = 0.41

Ka = 1

Kb = 1

Ks = 1

Ki = 1.42

Km = 1.7

The diametrical pitch is equal to:

P_{d} =\frac{1}{m} =\frac{1}{5} =0.2mm^{-1}

The bending stress is equal to:

\sigma =\frac{W_{t}P_{d}K_{a}K_{m}K_{s}K_{b}K_{i} }{FJ_{g}K_{v}}  \\\sigma =\frac{22000*0.2*1*1.7*1*1*1.42}{62*0.41*0.832} =502.22MPa

4 0
3 years ago
18. What is being shown in the above Figure?
slavikrds [6]

D. Camshaft gear backlash is being checked​

hope this helps :)

8 0
3 years ago
Read 2 more answers
Other questions:
  • Your Java program will be reading input from a file name strInput.txt. Each record contains String firstname String lastName Str
    13·1 answer
  • A hole drilled into a manufactured part is specified to have a diameter of 1.50 cm. Ten parts are sampled from a production run.
    10·1 answer
  • Why is it important to stop climate change?
    15·2 answers
  • During an expansion process, the pressure of a gas changes from 15 to 140 psia according to the relation P = aV + b, where a = 5
    12·1 answer
  • A plastic molding machine produces a product whose annual demand is in the millions.
    15·1 answer
  • A rod is made from two segments: AB is steel and BC is brass. It is fixed at its ends and subjected to a torque of T = 680 N.m.
    5·1 answer
  • What energy type is represented in the picture?
    6·2 answers
  • ____________engineers build and test tools and machines, and they rely heavily on computer, math, and problem-solving skills.
    7·2 answers
  • David wants to obtain a job as a quality engineer at a manufacturing facility. Which of the following paths should he follow to
    15·1 answer
  • Using data in Appendix A ,calculate the number of atoms in 1 tonne of iron
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!