From 0843ef3283f9a8a6a2f405545b2c7a39c64bef9d Mon Sep 17 00:00:00 2001 From: Jorge Ruiz Date: Tue, 23 Jun 2020 15:04:53 -0600 Subject: [PATCH] reto terminado --- .idea/.gitignore | 3 +++ .idea/challenge-python-04.iml | 11 ++++++++ .idea/inspectionProfiles/Project_Default.xml | 17 ++++++++++++ .../inspectionProfiles/profiles_settings.xml | 6 +++++ .idea/misc.xml | 7 +++++ .idea/modules.xml | 8 ++++++ .idea/vcs.xml | 6 +++++ html_decorators.py | 27 ++++++++++++------- 8 files changed, 76 insertions(+), 9 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/challenge-python-04.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/challenge-python-04.iml b/.idea/challenge-python-04.iml new file mode 100644 index 0000000..8dc09e5 --- /dev/null +++ b/.idea/challenge-python-04.iml @@ -0,0 +1,11 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..a87c138 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,17 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..b158bc4 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..2be73a3 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/html_decorators.py b/html_decorators.py index 8d9c421..7c49212 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): + transform = '
'+func(*args)+'
' + return transform + + return wrapper def article(func): - # You have to code here! - pass + def wrapper(*args): + transform = '
'+func(*args)+'
' + return transform + + return wrapper def p(func): - # You have to code here! - pass + def wrapper(*args): + transform = '

'+func(*args)+'

' + return transform + + 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?'