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 Canon EOS 250 is a digital DSLR that features a 24MP sensor. It is powered by the Canon LP-E17, which is a rechargeable Lithium-Ion battery pack.
Explanation:
The Lamborghini SCV12 has 830 horse power.
Answer:
Certamente você conhece três dimensões: comprimento, largura e profundidade. Além disso, quando se pensa um pouco fora da caixa também seria possível adicionar a dimensão do tempo.
Provavelmente, algumas pessoas viajam na maionese quando toca-se nesse assunto. Vem em suas mentes universos paralelos e até mesmo realidades alternativas. Mas também não se trata disso.
Explanation:
Basicamente as dimensões são as facetas do que nós percebemos a ser realidade. Existem muitos debates sobre dimensões na física. Um dos que mais chamam a atenção se chama Teoria das Cordas.
r
Answer: 8.33333333 or 6.1989778
Explanation: