Skip to content

Commit 9ae2e52

Browse files
committed
Corrección Roadmap 24 + Nuevo ejercicio 25
1 parent 475ed62 commit 9ae2e52

File tree

4 files changed

+95
-4
lines changed

4 files changed

+95
-4
lines changed

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
2828
## Corrección y próximo ejercicio
2929

30-
> #### Lunes 17 de junio de 2024 a las 20:00 (hora España) desde **[Twitch](https://twitch.tv/mouredev)**
31-
> #### Consulta el **[horario](https://discord.gg/JTkmHgY6?event=1247249059278749716)** por país y crea un **[recordatorio](https://discord.gg/JTkmHgY6?event=1247249059278749716)**
30+
> #### Lunes 24 de junio de 2024 a las 20:00 (hora España) desde **[Twitch](https://twitch.tv/mouredev)**
31+
> #### Consulta el **[horario](https://discord.gg/EWMJPcUq?event=1249918242370355262)** por país y crea un **[recordatorio](https://discord.gg/EWMJPcUq?event=1249918242370355262)**
3232
3333
## Roadmap
3434

@@ -58,7 +58,8 @@
5858
|21|[CALLBACKS](./Roadmap/21%20-%20CALLBACKS/ejercicio.md)|[📝](./Roadmap/21%20-%20CALLBACKS/python/mouredev.py)|[▶️](https://youtu.be/tqQo9SjJFlY)|[👥](./Roadmap/21%20-%20CALLBACKS/)
5959
|22|[FUNCIONES DE ORDEN SUPERIOR](./Roadmap/22%20-%20FUNCIONES%20DE%20ORDEN%20SUPERIOR/ejercicio.md)|[📝](./Roadmap/22%20-%20FUNCIONES%20DE%20ORDEN%20SUPERIOR/python/mouredev.py)|[▶️](https://youtu.be/ABniGtbqAXk)|[👥](./Roadmap/22%20-%20FUNCIONES%20DE%20ORDEN%20SUPERIOR/)
6060
|23|[SINGLETON](./Roadmap/23%20-%20SINGLETON/ejercicio.md)|[📝](./Roadmap/23%20-%20SINGLETON/python/mouredev.py)|[▶️](https://youtu.be/cOIcFo_w9hA)|[👥](./Roadmap/23%20-%20SINGLETON/)
61-
|24|[DECORADORES](./Roadmap/24%20-%20DECORADORES/ejercicio.md)|[🗓️ 17/06/24](https://discord.gg/JTkmHgY6?event=1247249059278749716)||[👥](./Roadmap/24%20-%20DECORADORES/)
61+
|24|[DECORADORES](./Roadmap/24%20-%20DECORADORES/ejercicio.md)|[📝](./Roadmap/24%20-%20DECORADORES/python/mouredev.py)||[👥](./Roadmap/24%20-%20DECORADORES/)
62+
|25|[LOGS](./Roadmap/25%20-%20LOGS/ejercicio.md)|[🗓️ 24/06/24](https://discord.gg/EWMJPcUq?event=1249918242370355262)||[👥](./Roadmap/25%20-%20LOGS/)
6263

6364
## Instrucciones
6465

Roadmap/24 - DECORADORES/ejercicio.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# #24 DECORADORES
1+
# #24 PATRONES DE DISEÑO: DECORADORES
22
> #### Dificultad: Fácil | Publicación: 10/06/24 | Corrección: 17/06/24
33
44
## Ejercicio
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
"""
2+
Ejercicio
3+
"""
4+
5+
6+
def print_call(function):
7+
def print_function():
8+
print(f"La función '{function.__name__}' ha sido llamada.")
9+
return function
10+
return print_function
11+
12+
13+
@print_call
14+
def example_function():
15+
pass
16+
17+
18+
@print_call
19+
def example_function_2():
20+
pass
21+
22+
23+
@print_call
24+
def example_function_3():
25+
pass
26+
27+
28+
example_function()
29+
example_function_2()
30+
example_function_3()
31+
32+
"""
33+
Extra
34+
"""
35+
36+
37+
def call_counter(function):
38+
def counter_function():
39+
counter_function.call_count += 1
40+
print(
41+
f"La función '{function.__name__} se ha llamado {counter_function.call_count}' veces.")
42+
return function
43+
44+
counter_function.call_count = 0
45+
return counter_function
46+
47+
48+
@call_counter
49+
def example_function_4():
50+
pass
51+
52+
53+
@call_counter
54+
def example_function_5():
55+
pass
56+
57+
58+
example_function_4()
59+
example_function_4()
60+
example_function_4()
61+
example_function_4()
62+
example_function_5()
63+
example_function_4()
64+
example_function_5()

Roadmap/25 - LOGS/ejercicio.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# #25 LOGS
2+
> #### Dificultad: Fácil | Publicación: 17/06/24 | Corrección: 24/06/24
3+
4+
## Ejercicio
5+
6+
```
7+
/*
8+
* EJERCICIO:
9+
* Explora el concepto de "logging" en tu lenguaje. Configúralo y muestra
10+
* un ejemplo con cada nivel de "severidad" disponible.
11+
*
12+
* DIFICULTAD EXTRA (opcional):
13+
* Crea un programa ficticio de gestión de tareas que permita añadir, eliminar
14+
* y listar dichas tareas.
15+
* - Añadir: recibe nombre y descripción.
16+
* - Eliminar: por nombre de la tarea.
17+
* Implementa diferentes mensajes de log que muestren información según la
18+
* tarea ejecutada (a tu elección).
19+
* Utiliza el log para visualizar el tiempo de ejecución de cada tarea.
20+
*/
21+
```
22+
#### Tienes toda la información extendida sobre el roadmap de retos de programación en **[retosdeprogramacion.com/roadmap](https://retosdeprogramacion.com/roadmap)**.
23+
24+
Sigue las **[instrucciones](../../README.md)**, consulta las correcciones y aporta la tuya propia utilizando el lenguaje de programación que quieras.
25+
26+
> Recuerda que cada semana se publica un nuevo ejercicio y se corrige el de la semana anterior en directo desde **[Twitch](https://twitch.tv/mouredev)**. Tienes el horario en la sección "eventos" del servidor de **[Discord](https://discord.gg/mouredev)**.

0 commit comments

Comments
 (0)