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:
Yes, they have to make certain sacrifices ! for many many benefits.
Answer:
The required diameter of the fuse wire should be 0.0383 cm to limit the current to 0.53 A with current density of 459 A/cm²
.
Explanation:
We are given current density of 459 A/cm² and we want to limit the current to 0.53 A in a fuse wire. We are asked to find the corresponding diameter of the fuse wire.
Recall that current density is given by
j = I/A
where I is the current flowing through the wire and A is the area of the wire
A = πr²
but r = d/2 so
A = π(d/2)²
A = πd²/4
so the equation of current density becomes
j = I/πd²/4
j = 4I/πd²
Re-arrange the equation for d
d² = 4I/jπ
d = √4I/jπ
d = √(4*0.53)/(459π)
d = 0.0383 cm
Therefore, the required diameter of the fuse wire should be 0.0383 cm to limit the current to 0.53 A with current density of 459 A/cm²
.
Answer:
Electromechanical systems or devices are systems or devices that involves the interaction between electrical systems and mechanical systems in which the motion of mechanical parts is converted to electrical energy or made to interact with energy or in which electrical energy is converted to mechanical energy or interacts with a moving mechanical system
Therefore;
Electromechanical systems convert <u>electrical energy</u> input into a <u>mechanical energy</u> output
Explanation: