diff --git a/html_decorators.py b/html_decorators.py index 8d9c421..a5bdde6 100644 --- a/html_decorators.py +++ b/html_decorators.py @@ -1,22 +1,31 @@ def div(func): - # You have to code here! - pass + def wrapper(*args, **kwargs): + text_function = func(args[0]) + print(f'
{text_function}
') + return text_function + return wrapper def article(func): - # You have to code here! - pass + def wrapper(*args, **kwargs): + text_function = func(args[0]) + print(f'
{text_function}
') + return text_function + return wrapper -def p(func): - # You have to code here! - pass +def p(func): + def wrapper(*args, **kwargs): + text_function = func(args[0]) + return f'

{text_function}

' + return wrapper + # Here you must apply the decorators, uncomment this later -# @div -# @article -# @p +@p +@article +@div def saludo(nombre): return f'¡Hola {nombre}, ¿Cómo estás?'