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:
P > 142.5 N (→)
the motion sliding
Explanation:
Given
W = 959 N
μs = 0.3
If we apply
∑ Fy = 0 (+↑)
Ay + By = W
If Ay = By
2*By = W
By = W / 2
By = 950 N / 2
By = 475 N (↑)
Then we can get F (the force of friction) as follows
F = μs*N = μs*By
F = 0.3*475 N
F = 142.5 N (←)
we can apply
P - F > 0
P > 142.5 N (→)
the motion sliding
Answer:
Explanation:
The python code to generate this is quite simple to run.
i hope you understand everything written here, you can as well try out other problems to understand better.
First to begin, we import the package;
Code:
import pandas as pd
import matplotlib.pyplot as plt
name = input('Enter name of the file: ')
op = input('Enter name of output file: ')
df = pd.read_csv(name)
df['Date'] = pd.to_datetime(df["Date"].apply(str))
plt.plot(df['Date'],df['Absent']/(df['Present']+df['Absent']+df['Released']),label="% Absent")
plt.legend(loc="upper right")
plt.xticks(rotation=20)
plt.savefig(op)
plt.show()
This should generate the data(plot) as seen in the uploaded screenshot.
thanks i hope this helps!!!
The workers went to bed hungry probably because they are hard workers and so didn’t want to eat because they didn’t want to take break┌(; ̄◇ ̄)┘
Answer:
5,4,1, this is a explication