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
Question # 3
tino4ka555 [31]

Answer:

I think it's False.

Apologies if I am wrong.

4 0
3 years ago
Read 2 more answers
A welding rod with κ = 30 (Btu/hr)/(ft ⋅ °F) is 20 cm long and has a diameter of 4 mm. The two ends of the rod are held at 500 °
SOVA2 [1]

Answer:

In Btu:

Q=0.001390 Btu.

In Joule:

Q=1.467 J

Part B:

Temperature at midpoint=274.866 C

Explanation:

Thermal Conductivity=k=30  (Btu/hr)/(ft ⋅ °F)= \frac{30}{3600} (Btu/s)/(ft.F)=8.33*10^{-3}  (Btu/s)/(ft.F)

Thermal Conductivity is SI units:

k=30(Btu/hr)/(ft.F) * \frac{1055.06}{3600*0.3048*0.556} \\k=51.88 W/m.K

Length=20 cm=0.2 m= (20*0.0328) ft=0.656 ft

Radius=4/2=2 mm =0.002 m=(0.002*3.28)ft=0.00656 ft

T_1=500 C=932 F

T_2=50 C= 122 F

Part A:

In Joules (J)

A=\pi *r^2\\A=\pi *(0.002)^2\\A=0.00001256 m^2

Heat Q is:

Q=\frac{k*A*(T_1-T_2)}{L} \\Q=\frac{51.88*0.000012566*(500-50}{0.2}\\ Q=1.467 J

In Btu:

A=\pi *r^2\\A=\pi *(0.00656)^2\\A=0.00013519 m^2

Heat Q is:

Q=\frac{k*A*(T_1-T_2)}{L} \\Q=\frac{8.33*10^{-3}*0.00013519*(932-122}{0.656}\\ Q=0.001390 Btu

PArt B:

At midpoint Length=L/2=0.1 m

Q=\frac{k*A*(T_1-T_2)}{L}

On rearranging:

T_2=T_1-\frac{Q*L}{KA}

T_2=500-\frac{1.467*0.1}{51.88*0.00001256} \\T_2=274.866\ C

4 0
3 years ago
Find the following for an input of 120 VAC(RMS), 60 hertz, given a 10:1 stepdown transformer, and a full-wave bridge rectifier.
atroni [7]

Answer:

(i) 169.68 volt

(ii) 16.90 volt

(iii) 16.90 volt

(iv) 108.07 volt

(v) 2.161 A

Explanation:

Turn ratio is given as 10:1

We have given that input voltage v_p=120volt

(i) We know that peak voltage is give by v_{peak}=\sqrt{2}v_p=\sqrt{2}\times 120=169.68volt

(ii) We know that for transformer \frac{v_p}{v_s}=\frac{n_p}{n_s}

So \frac{169.08}{v_s}=\frac{10}{1}

v_s=16.90volt

So peak voltage in secondary will be 16.90 volt

(iii) Peak voltage of the rectifier will be equal to the peak voltage of the secondary

So peak voltage of the rectifier will be 16.90 volt

(iv) Dc voltage of the rectifier is given by v_{dc}=\frac{2v_m}{\pi }=\frac{2\times 1.414\times 120}{3.14}=108.07volt

(v) Now dc current is given by i_{dc}=\frac{v_{dc}}{R}=\frac{108.07}{50}=2.1614A

4 0
2 years ago
Suppose the following two events occur at the same time: the Chicago Cubs win the World Series, and the workers who make Cubs me
Annette [7]

Answer:

the answer would be decrease decrease

3 0
3 years ago
The yield stress of a steel is 250Mpa. A steel rod used for implant in a femurneeds to withstand 29KN. What should the diameter
OleMash [197]

Answer:

r = 1.922 mm

Explanation:

We are given;

Yield stress; σ = 250 MPa = 250 N/mm²

Force; F = 29 KN = 29000 N

Now, formula for yield stress is;

σ = F/A

A = F/σ

Where A is area = πr²

Thus;

r² = 2900/250π

r² = 3.6924

r = √3.6924

r = 1.922 mm

3 0
3 years ago
Other questions:
  • Which statement about direct-mail messages is most accurate? Group of answer choices Direct mail is an effective channel for per
    15·1 answer
  • How fast is a 2012 nissan sentra<br>speed and acceleration ​
    15·1 answer
  • 1- A square-wave inverter has a dc source of 96 V and an output frequency of 60 Hz. The load is a series RL load with R = 5 Ohm
    7·1 answer
  • What kind of value should an employee possess when employees are expected to be responsible and fair?
    5·1 answer
  • Plz help me
    12·1 answer
  • Air enters a well-insulated turbine operating at steady, state with negligible velocity at 4 MPa, 300°C. The air expands to an e
    10·1 answer
  • In Josiah Johnson Hawes and Albert Sands Southworth, Early Operation under Ether, Massachusetts General Hospital the elevated vi
    11·1 answer
  • B1) 20 pts. The thickness of each of the two sheets to be resistance spot welded is 3.5 mm. It is desired to form a weld nugget
    8·1 answer
  • Question 8(Multiple Choice Worth 2 points)
    6·1 answer
  • How old are legos? Who created them? Why did they create them?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!