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:
The correct option is;
c. the exergy of the tank can be anything between zero to P₀·V
Explanation:
The given parameters are;
The volume of the tank = V
The pressure in the tank = 0 Pascal
The pressure of the surrounding = P₀
The temperature of the surrounding = T₀
Exergy is a measure of the amount of a given energy which a system posses that is extractable to provide useful work. It is possible work that brings about equilibrium. It is the potential the system has to bring about change
The exergy balance equation is given as follows;
![X_2 - X_1 = \int\limits^2_1 {} \, \delta Q \left (1 - \dfrac{T_0}{T} \right ) - [W - P_0 \cdot (V_2 - V_1)]- X_{destroyed}](https://tex.z-dn.net/?f=X_2%20-%20X_1%20%3D%20%5Cint%5Climits%5E2_1%20%7B%7D%20%5C%2C%20%5Cdelta%20Q%20%5Cleft%20%281%20-%20%5Cdfrac%7BT_0%7D%7BT%7D%20%5Cright%20%29%20-%20%5BW%20-%20P_0%20%5Ccdot%20%28V_2%20-%20V_1%29%5D-%20X_%7Bdestroyed%7D)
Where;
X₂ - X₁ is the difference between the two exergies
Therefore, the exergy of the system with regards to the environment is the work received from the environment which at is equal to done on the system by the surrounding which by equilibrium for an empty tank with 0 pressure is equal to the product of the pressure of the surrounding and the volume of the empty tank or P₀ × V less the work, exergy destroyed, while taking into consideration the change in heat of the system
Therefore, the exergy of the tank can be anything between zero to P₀·V.
Answer:
b) false
Explanation:
We know that Otto cycle is the ideal cycle for all petrol working engine.In Otto cycle all process are consider is ideal ,means there is no any ir-reversibility in the processes.
It consist four processes
1-2:Reversible adiabatic compression
2-3:Constant volume heat addition
3-4:Reversible adiabatic expansion
3-4:Constant volume heat rejection
Along with above 4 processes intake and exhaust processes are parallel to each other.From the P-v diagram we can see that all processes.
But actually in general we are not showing intake and exhaust line then it did not mean that in Otto cycle did not have intake and exhaust processes.
Answer:
Velocity of ball B after impact is
and ball A is 
Explanation:
= Initial velocity of ball A

= Initial velocity of ball B = 0
= Final velocity of ball A
= Final velocity of ball B
= Coefficient of restitution = 0.8
From the conservation of momentum along the normal we have

Coefficient of restitution is given by



Adding the above two equations we get



From the conservation of momentum along the plane of contact we have


Velocity of ball B after impact is
and ball A is
.