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:
Question
Determine the average water exit velocity
Answer:
53.05 m/s
Explanation:
Given information
Volume flow rate, 
Diameter d= 8cm= 0.08 m
Assumptions
- The flow is jet flow hence momentum-flux correction factor is unity
- Gravitational force is not considered
- The flow is steady, frictionless and incompressible
- Water is discharged to the atmosphere hence pressure is ignored
We know that Q=AV and making v the subject then
where V is the exit velocity and A is area
Area,
where d is the diameter
By substitution

To convert v to m/s from m/s, we simply divide it by 60 hence

Answer:
The rate of heat generation in the wire per unit volume is 5.79×10^7 Btu/hrft^3
Heat flux is 9.67×10^7 Btu/hrft^2
Explanation:
Rate of heat generation = 1000 W = 1000/0.29307 = 3412.15 Btu/hr
Area (A) = πD^2/4
Diameter (D) = 0.08 inches = 0.08 in × 3.2808 ft/39.37 in = 0.0067 ft
A = 3.142×0.0067^2/4 = 3.53×10^-5 ft^2
Volume (V) = A × Length
L = 20 inches = 20 in × 3.2808 ft/39.37 in = 1.67 ft
V = 3.53×10^-5 × 1.67 = 5.8951×10^-5 ft^3
Rate of heat generation in the wire per unit volume = 3412.15 Btu/hr ÷ 5.8951×10^-5 ft^3 = 5.79×10^7 Btu/hrft^3
Heat flux = 3412.15 Btu/hr ÷ 3.53×10^-5 ft^2 = 9.67×10^7 Btu/hrft^2
Answer: The exit temperature of the gas in deg C is
.
Explanation:
The given data is as follows.
= 1000 J/kg K, R = 500 J/kg K = 0.5 kJ/kg K (as 1 kJ = 1000 J)
= 100 kPa, 

We know that for an ideal gas the mass flow rate will be calculated as follows.

or, m = 
=
= 10 kg/s
Now, according to the steady flow energy equation:




= 5 K
= 5 K + 300 K
= 305 K
= (305 K - 273 K)
= 
Therefore, we can conclude that the exit temperature of the gas in deg C is
.