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) ∝ and β
The phase compositions are :
C
= 5wt% Sn - 95 wt% Pb
C
= 98 wt% Sn - 2wt% Pb
b)
The phase is; ∝
The phase compositions is; 82 wt% Sn - 91.8 wt% Pb
Explanation:
a) 15 wt% Sn - 85 wt% Pb at 100⁰C.
The phases are ; ∝ and β
The phase compositions are :
C
= 5wt% Sn - 95 wt% Pb
C
= 98 wt% Sn - 2wt% Pb
b) 1.25 kg of Sn and 14 kg Pb at 200⁰C
The phase is ; ∝
The phase compositions is; 82 wt% Sn - 91.8 wt% Pb
Csn = 1.25 * 100 / 1.25 + 14 = 8.2 wt%
Cpb = 14 * 100 / 1.25 + 14 = 91.8 wt%
Answer:
V = 0.30787 m³/s
m = 2.6963 kg/s
v2 = 0.3705 m³/s
v2 = 6.017 m/s
Explanation:
given data
diameter = 28 cm
steadily =200 kPa
temperature = 20°C
velocity = 5 m/s
solution
we know mass flow rate is
m = ρ A v
floe rate V = Av
m = ρ V
flow rate = V =
V = Av = 
V = 
V = 0.30787 m³/s
and
mass flow rate of the refrigerant is
m = ρ A v
m = ρ V
m =
= 
m = 2.6963 kg/s
and
velocity and volume flow rate at exit
velocity = mass × v
v2 = 2.6963 × 0.13741 = 0.3705 m³/s
and
v2 = A2×v2
v2 = 
v2 = 
v2 = 6.017 m/s
Answer:
The velocity in the pipe is 5.16m/s. The pipe diameter for the second fluid should be 6.6 mm.
Explanation:
Here the first think you have to consider is the definition of the Reynolds number (
) for flows in pipes. Rugly speaking, the Reynolds number is an adimensonal parameter to know if the fliud flow is in laminar or turbulent regime. The equation to calculate this number is:

where
is the density of the fluid,
is the viscosity, D is the pipe diameter and v is the velocity of the fluid.
Now, we know that Re=2100. So the velocity is:

For the second fluid, we want to keep the Re=2100 and v=5.16m/s. Therefore, using the equation of Reynolds number the diameter is:
