From 43992e27be134812e44af937368240e83f3ea505 Mon Sep 17 00:00:00 2001 From: Jose Melendez Date: Thu, 23 Jul 2020 21:53:03 -0500 Subject: [PATCH] Hypertext decorators in Saludo --- html_decorators.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/html_decorators.py b/html_decorators.py index 8d9c421..7c6e121 100644 --- a/html_decorators.py +++ b/html_decorators.py @@ -1,22 +1,30 @@ def div(func): - # You have to code here! - pass + def new_function(*args, **kwargs): + hypertext = '
'+ func(*args, **kwargs) +'
' + return hypertext + return new_function def article(func): - # You have to code here! - pass + def new_function(*args, **kwargs): + hypertext = '
'+ func(*args, **kwargs) +'
' + return hypertext + return new_function def p(func): - # You have to code here! - pass + def new_function(*args, **kwargs): + hypertext = '

'+ func(*args, **kwargs) +'

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