diff --git a/html_decorators.py b/html_decorators.py index 8d9c421..84f0264 100644 --- a/html_decorators.py +++ b/html_decorators.py @@ -1,28 +1,38 @@ +# coding: utf-8 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 +@div +@article +@p def saludo(nombre): return f'¡Hola {nombre}, ¿Cómo estás?' def run(): - print(saludo('Jorge')) + print(saludo('Jorge Arturo Salgado Ordoñez')) if __name__ == '__main__':