1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
rodikova [14]
3 years ago
15

Write the following decorators and apply them to a single function (applying multiple decorators to a single function): 1. The f

irst decorator is called strong and has an inner function called wrapper. The purpose of this decorator is to add the html tags of and to the argument of the decorator. The return value of the wrapper should look like: return """" + func() + """" 2. The decorator will return the wrapper per usual. 3. The second decorat
Engineering
1 answer:
natita [175]3 years ago
5 0

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:

You might be interested in
Problematic substances mechanical engeneering???
Sonja [21]

Answer:

The climate crisis. ...

Making water clean and accessible. ...

Providing enough food. ...

Personalised and relevant education. ...

Improving health care. ...

The refugee crisis. ...

Cyber security. ...

Enlisting the youth

6 0
2 years ago
Can someone answer plz!! It’s 24 points
fgiga [73]

Explanation:

750 microvolt is your answer

please mark as brilliant

3 0
2 years ago
Read 2 more answers
What is the thermal efficiency of this regeneration cycle in terms of enthalpies and fractions of total flow?
irga5000 [103]

Answer:

\eta =\dfrac{(h_3-h_4)-(h_2-h_1)}{(h_3-h_5)}

Explanation:

generally regeneration of cycle is used in the case of gas turbine. due to regeneration efficiency of turbine is increased but there is no effect on the on the net work out put of turbine.Actually in regeneration net heta input is decreases that is why total efficiency  increase.

 Now from T-S diagram

    W_{net}=W_{out}-W_{in}

   W_{net}=(h_3-h_4)-(h_2-h_1)

  Q_{in}=h_3-h_5

  Due to generation (h_5-h_2) amount of energy has been saved.

  Q_{generation}=Q_{saved}

So efficiency of cycle \eta =\frac{W_{net}}{Q_{in}}

  \eta =\dfrac{(h_3-h_4)-(h_2-h_1)}{(h_3-h_5)}

Effectiveness of re-generator

  \varepsilon =\dfrac{(h_5-h_2)}{(h_4-h_2)}

So the efficiency of regenerative cycle

\eta =\dfrac{(h_3-h_4)-(h_2-h_1)}{(h_3-h_5)}

7 0
2 years ago
write down your own definition of Engineering, preferably in 4-5 sentences. Maximum of 150 words for your definition???.​
ollegr [7]

Answer:

A charge q1=7.0mc is located at the origin and a second charge q2=-5.0mc is located on the x axis, 0.3m the origin find the electric field at the point p which he's coordinates (0,0.40)m

4 0
3 years ago
A robot was able to detect a burning smell at a shopping mall and prevent a major disaster. Which function enabled the robot to
adelina 88 [10]

Answer:

Smoke detectors on the robot.

Plz rate as Brainliest. I need it to get to the next rank.

3 0
3 years ago
Other questions:
  • A receptacle, plug, or any other electrical device whose design limits the ability of an electrician to come in contact with any
    14·1 answer
  • Exercise 19
    15·1 answer
  • When diagnosing engine noise, Technician A says a mechanical stethoscope may not be appropriate in pinpointing a squeaking drive
    14·1 answer
  • Create an array of 10 size and assign 10 random numbers. Now find the sum of the array using for and while loop.
    6·1 answer
  • Which of the following activities could be considered unethical?
    7·1 answer
  • Think of an employee object. What are several of the possible states that the object may have over time?
    6·1 answer
  • Merchandise without an expiration date like electronics, tools and home goods typically have a longer
    15·1 answer
  • A golfer and her caddy see lightning nearby. the golfer is about to take his shot with a metal club, while her caddy is holding
    12·1 answer
  • Guyss I seriously and urgently need help what are the steps to build a headgear ??​
    5·2 answers
  • The three construction crafts that require a MINIMUM of a 4-year college degree are
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!