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
A PMMA plate with a 25 mm (width) x 6.5 mm (thickness) cross-section has a contained crack of length 2c = 0.5 mm in the center o
victus00 [196]

Answer:

LAOD = 6669.86 N

Explanation:

Given data:

width= 25 mm = 25\times 10^{-3} m

thickness = 6.5 mm = 6.5\times 10^{-3} m

crack length 2c = 0.5 mm at centre of specimen

\sigma _{applied} =  1000 N/cross sectional area

stress intensity factor  =  k  will be

\sigma_{applied} = \frac{1000}{25\times 10^{-3}\times 6.5\times 10^{-3}}

                   = 6.154\times 10^{6} Pa

we know that

k =\sigma_{applied} (\sqrt{\pi C})

  =6.154\sqrt{\pi (2.5\times 10^{-04})}          [c =0.5/2 = 2.5*10^{-4}]

K = 0.1724 Mpa m^{1/2} for 1000 load

ifK_C = 1.15 Mpa m^{1/2} then load will be

Kc = \sigma _{frac}(\sqrt{\pi C})

1.15 MPa = \sigma _{frac}\times \sqrt{\pi (2.5\times 10^{-04})}

\sigma _{frac} = 41.04 MPa

load = \sigma _{frac}\times Area

load = 41.04 \times 10^6 \times 25\times 10^{-3}\times 6.5\times 10^{-3} N

LAOD = 6669.86 N

3 0
3 years ago
LAB 3.3 – Working with String Input and Type CastingStep 1: RemovefindErrors.cppfrom the project and add thepercentage.cppprogra
jolli1 [7]

Answer:

// Program is written in C++ Programming Language

// Comments are used for explanatory purpose

#include<iostream>

using namespace std;

int main ()

{

// Variable declaration

string name;

int numQuestions;

int numCorrect;

double percentage;

//Prompt to enter student's first and last name

cout<<"Enter student's first and last name";

cin>>name; // this line accepts input for variable name

cout<<"Number of question on test"; //Prompt to enter number of questions on test

cin>> numQuestions; //This line accepts Input for Variable numQuestions

cout<<"Number of answers student got correct: "; // Prompt to enter number of correct answers

cin>>numCorrect; //Enter number of correct answers

percentage = numCorrect * 100 / numQuestions; // calculate percentage

cout<<name<<" "<<percentage<<"%"; // print

return 0;

}

Explanation:

The code above calculates the percentage of a student's score in a certain test.

The code is extracted from the Question and completed after extraction.

It's written in C++ programming language

4 0
4 years ago
What flow type occurs when the heat exchanger has multiple passes and baffles?
Vanyuwa [196]
I think that the answer would be B or C
4 0
3 years ago
To do the right thing or to have moral principles is called _____ . a code
crimeas [40]

Answer:

Ethics

Explanation:

To do the right thing or to have moral principles is called ethics. Ethics affect how people make decisions and lead their lives. Some words people associate with ethics includes:

- Honesty

- Integrity

- Promise keeping and Trustworthiness

- Loyalty

- Fairness

- Concern for others

- Respect for others

- Law abiding

etc.

7 0
3 years ago
In several sentences, please discuss:
Bezzdna [24]

Answer:

Everything is explained below in the Explanation section.

Explanation:

<em>a) TMDL stands for = Total Daily Maximum Loads</em>

TMDL is the measure of total maximum amount of pollutant allowed in the water body. TMDL is a important tool to maintain the quality of water and measure the aquatic pollution.

Whereas, the formula to calculate TMDL is as follows:

TMDL =  Sum of waste load allocations (point source) + Sum of load allocations (non point sources and background) + Margin of Safety

 

<em>b) Dead Zones :</em>

Dead zones are zones which are termed as hypoxic which are low in oxygen because of the extreme aquatic pollution caused by human activities which in result deplete the oxygen level above the and below the oceans most required by the marine life. In addition, dead zones are those areas where oxygen is low and life in danger is high comparatively to other areas of oceans.

The main cause of that dead zones is because of eutrophication which means adding dangerous chemical nutrients in the water in exceeding amounts.

<em>c) Why Ammonia-nitrogen is detrimental to waterbodies: </em>

1. Ammonia nitrogen is a very toxic pollutant often found in landfills and sewage and waste products.

2. Ammonia nitrogen reduces the ability of water to disinfect its inhabitants and it reduces the purity. Furthermore, it changes the smell of the water and pollutes it.

3. Last but not the least, if you increase the concentration of ammonia nitrogen, the dissolved oxygen rate will be decreased and it has a inverse relation which is very dangerous to marine life underwater.

<em>d) Streeter-Phelps DO curve:</em>

Please refer to the attachment, I have attached the curve.

This curve is used to evaluate the dissolved oxygen in the water with varying distance.

It can be further studied from the curve that, how much loss sewage and other pollutants can endure upon the marine life.

8 0
3 years ago
Other questions:
  • The phrase "positive to positive, negative to ground" is correct when jump starting a car.
    9·1 answer
  • You are an engineer working in a auto crash test lab. Some members of your team have raised objections against the use of cadave
    10·1 answer
  • Underlining words and highlighting dates are part of a student's personal note taking key.
    6·2 answers
  • Cómo se llama el componente, que permite abrir o cerrar un circuito eléctrico
    8·1 answer
  • Q1. Basic calculation of the First law (2’) (a) Suppose that 150 kJ of work are used to compress a spring, and that 25 kJ of hea
    6·1 answer
  • How do i open a door<br> please i've been trapped in this room for ages
    9·1 answer
  • A motor driven water pump operates with an inlet pressure of 96 kPa (absolute) and mass flow rate of 120 kg/min. The motor consu
    7·1 answer
  • What is this i dont understand this at all
    9·1 answer
  • 1. Explain the term engine<br>compression​
    10·2 answers
  • Explain your own understanding about the relevant connections between the four subsystems of Earth through the use of a creative
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!