diff --git a/.gitignore b/.gitignore index b6e4761..0af027c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ __pycache__/ *.py[cod] *$py.class +.vscode # C extensions *.so diff --git a/html_decorators.py b/html_decorators.py index 8d9c421..d40e5ca 100644 --- a/html_decorators.py +++ b/html_decorators.py @@ -1,22 +1,37 @@ def div(func): # You have to code here! - pass + def wrapper(*args): + + print(f'
{func(*args)}
') + + + return wrapper def article(func): # You have to code here! - pass + def wrapper(*args): + + print(f'
{func(*args)}
') + + + return wrapper def p(func): # You have to code here! - pass + def wrapper(*args): + + print(f'

{func(*args)}

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