Answer:
Complete question is:
write the following decorators and apply them to a single function (applying multiple decorators to a single function):
1. The first decorator is called strong and has an inner function called wrapper. The purpose of this decorator is to add the html tags of <strong> and </strong> to the argument of the decorator. The return value of the wrapper should look like: return “<strong>” + func() + “</strong>”
2. The decorator will return the wrapper per usual.
3. The second decorator is called emphasis and has an inner function called wrapper. The purpose of this decorator is to add the html tags of <em> and </em> to the argument of the decorator similar to step 1. The return value of the wrapper should look like: return “<em>” + func() + “</em>.
4. Use the greetings() function in problem 1 as the decorated function that simply prints “Hello”.
5. Apply both decorators (by @ operator to greetings()).
6. Invoke the greetings() function and capture the result.
Code :
def strong_decorator(func):
def func_wrapper(name):
return "<strong>{0}</strong>".format(func(name))
return func_wrapper
def em_decorator(func):
def func_wrapper(name):
return "<em>{0}</em>".format(func(name))
return func_wrapper
@strong_decorator
@em_decorator
def Greetings(name):
return "{0}".format(name)
print(Greetings("Hello"))
Explanation:
Answer:
(a) The stress on the steel wire is 19,000 Psi
(b) The strain on the steel wire is 0.00063
(c) The modulus of elasticity of the steel is 30,000,000 Psi
Explanation:
Given;
length of steel wire, L = 100 ft
cross-sectional area, A = 0.0144 in²
applied force, F = 270 lb
extension of the wire, e = 0.75 in
<u>Part (A)</u> The stress on the steel wire;
δ = F/A
= 270 / 0.0144
δ = 18750 lb/in² = 19,000 Psi
<u>Part (B)</u> The strain on the steel wire;
σ = e/ L
L = 100 ft = 1200 in
σ = 0.75 / 1200
σ = 0.00063
<u>Part (C)</u> The modulus of elasticity of the steel
E = δ/σ
= 19,000 / 0.00063
E = 30,000,000 Psi
Answer:
Technician B is right.
Explanation:
Air conditioning refrigerant contains Freon R22 and R410a, which have been linked to environmental damages, including ozone depletion, global warming, and energy-inefficiency. For environmentally-savvy entities and individuals, there is the modern move to a more environment-friendly refrigerant, known as R-32. Technician A's advice to vent the refrigerant outside the shop is in bad taste. He does not seem to be aware of the environmental footprint of such an action. Venting gas outside, in addition to the environmental damages, is also a waste of resources, and therefore, costly. This is why Technician B's advice should be preferred.
Answer:
Hence, the three effects of electric current are heating effect, magnetic effect and chemical effect.