Put decorators and closures into practice! Write two reusable decorators that can be applied to any function.
Create two decorators:
@log_call
"Calling: function_name"
@shout
greet(name)
"hello, {name}"
def log_call(func):
def wrapper(*args, **kwargs):
print(f"Calling: {func.__name__}")
return func(*args, **kwargs)
return wrapper
def greet(name): ...
Console initialized... Ready for Project 5: Decorator Toolkit > Build your two decorators and apply them to greet() > Complete button activates when output matches!