From b682ed5a51df4b48d507ee08312489b342b4993e Mon Sep 17 00:00:00 2001 From: Angel Flores Date: Mon, 22 Jun 2020 11:47:39 -0500 Subject: [PATCH] Challenged solver --- html_decorators.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/html_decorators.py b/html_decorators.py index 8d9c421..5a56974 100644 --- a/html_decorators.py +++ b/html_decorators.py @@ -1,29 +1,33 @@ def div(func): - # You have to code here! - pass + def wrapper(*args, **kwargs): + return f"
{func(*args, **kwargs)}
" + return wrapper + def article(func): - # You have to code here! - pass + def wrapper(*args, **kwargs): + return f"
{func(*args, **kwargs)}" + return wrapper def p(func): - # You have to code here! - pass + def wrapper(*args, **kwargs): + return f"

{func(*args, **kwargs)}

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