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:
For SGID you type this
$ find . -perm /4000
For SUID you type this
$ find . -perm /2000
Explanation:
Auxiliary file permissions, that are commonly referred to as “special permissions” in Linux are needed in order to easily find files which have SUID (Setuid) and SGID (Setgid) set.
After typing
$ find directory -perm /permissions
Then type the commands in the attachment below to obtain a list of these files with SGID and SUID.
Yes, the green LED emits light when we connect the banana plug wires across it.
This indicates that the threshold voltage is lower for the green LED light than the blue.
<u>Explanation</u>:
A banana plug is named for its resemblance to the shape of a banana. They are wider in the middle of the plug, and narrower at the top and bottom. The banana plug can be easily plugged or unplugged into the ports of speaker or receiver.
LED lights emit photons when it is applied with electrical charge. LED lights are more efficient and last longer than incandescent light bulbs. Green light is commonly provides the calming effect. It is generally used in hyper-pigmentation treatment.
Answer:
O is truse is the best answer hhahahha
Explanation:
Answer:
41.5° C
Explanation:
Given data :
1025 steel
Temperature = 4°C
allowed joint space = 5.4 mm
length of rails = 11.9 m
<u>Determine the highest possible temperature </u>
coefficient of thermal expansion ( ∝ ) = 12.1 * 10^-6 /°C
Applying thermal strain ( Δl / l ) = ∝ * ΔT
( 5.4 * 10^-3 / 11.9 ) = 12.1 * 10^-6 * ( T2 - 4 )
∴ ( T2 - 4 ) = ( 5.4 * 10^-3 / 11.9 ) / 12.1 * 10^-6
hence : T2 = 41.5°C