forked from mouredev/retos-programacion-2023
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import re | ||
|
||
url = "https://retosdeprogramacion.com?year=2023&challenge=0&languaje=python" | ||
|
||
components = url.split("&") | ||
|
||
for component in components: | ||
if "=" in component: | ||
param = component.split("=") | ||
if len(param) == 2 and param[1] != "": | ||
print(param[1]) | ||
|
||
# Solución con una expresión regular | ||
regex = r"=([a-zA-Z0-9._%-]+)" | ||
params = re.findall(regex, url) | ||
print(params) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Reto #12: Viernes 13 | ||
#### Dificultad: Fácil | Publicación: 20/03/23 | Corrección: 27/03/23 | ||
|
||
## Enunciado | ||
|
||
``` | ||
/* | ||
* Crea una función que sea capaz de detectar si existe un viernes 13 en el mes y el año indicados. | ||
* - La función recibirá el mes y el año y retornará verdadero o falso. | ||
*/ | ||
``` | ||
#### Tienes toda la información extendida sobre los retos de programación semanales en **[retosdeprogramacion.com/semanales2023](https://retosdeprogramacion.com/semanales2023)**. | ||
|
||
Sigue las **[instrucciones](../../README.md)**, consulta las correcciones y aporta la tuya propia utilizando el lenguaje de programación que quieras. | ||
|
||
> 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)**. |