Skip to content

Commit

Permalink
Corrección Reto mouredev#35
Browse files Browse the repository at this point in the history
  • Loading branch information
mouredev committed Sep 4, 2023
1 parent ef62fdd commit 061f4d6
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ Aquí encontrarás el listado de retos, su fecha de publicación, dificultad y e
* **#32** - 07/08/23 | Media | [`LA COLUMNA DE EXCEL`](./Retos/Reto%20%2332%20-%20LA%20COLUMNA%20DE%20EXCEL%20%5BMedia%5D/ejercicio.md) | Correcciones: [[MI SOLUCIÓN](./Retos/Reto%20%2332%20-%20LA%20COLUMNA%20DE%20EXCEL%20%5BMedia%5D/python/mouredev.py)] [[COMUNIDAD](./Retos/Reto%20%2332%20-%20LA%20COLUMNA%20DE%20EXCEL%20%5BMedia%5D/)]
* **#33** - 14/08/23 | Difícil | [`TETRIS`](./Retos/Reto%20%2333%20-%20TETRIS%20%5BDifícil%5D/ejercicio.md) | Correcciones: [[MI SOLUCIÓN](./Retos/Reto%20%2333%20-%20TETRIS%20%5BDifícil%5D/python/mouredev.py)] [[COMUNIDAD](./Retos/Reto%20%2333%20-%20TETRIS%20%5BDifícil%5D/)]
* **#34** - 21/08/23 | Media | [`EL TXT`](./Retos/Reto%20%2334%20-%20EL%20TXT%20%5BMedia%5D/ejercicio.md) | Correcciones: [[MI SOLUCIÓN](./Retos/Reto%20%2334%20-%20EL%20TXT%20%5BMedia%5D/python/mouredev.py)] [[COMUNIDAD](./Retos/Reto%20%2334%20-%20EL%20TXT%20%5BMedia%5D/)]
* **#35** - 04/09/23 | Fácil | [`PRIMEROS PASOS`](./Retos/Reto%20%2335%20-%20PRIMEROS%20PASOS%20%5BFácil%5D/ejercicio.md) | Último reto publicado
* **#35** - 04/09/23 | Fácil | [`PRIMEROS PASOS`](./Retos/Reto%20%2335%20-%20PRIMEROS%20PASOS%20%5BFácil%5D/ejercicio.md) | Correcciones: [[MI SOLUCIÓN](./Retos/Reto%20%2335%20-%20PRIMEROS%20PASOS%20%5BFácil%5D/python/mouredev.py)] [[COMUNIDAD](./Retos/Reto%20%2335%20-%20PRIMEROS%20PASOS%20%5BFácil%5D/)]
* **#36** - 18/09/23 | Media | [`PERMUTACIONES`](./Retos/Reto%20%2336%20-%20PERMUTACIONES%20%5BMedia%5D/ejercicio.md) | Último reto publicado

> **Corrección y Publicación próximo reto - 04/09/23 | [🗓️ Horario evento corrección en directo](https://discord.gg/mouredev?event=1145649051660980264) en [Twitch](https://twitch.tv/mouredev)**
> **Corrección y Publicación próximo reto - 18/09/23 | [🗓️ Horario evento corrección en directo](https://discord.gg/mouredev?event=1148239735169495100) en [Twitch](https://twitch.tv/mouredev)**
*Puedes ejecutar el archivo [language_stats.py](./Retos/language_stats.py) para visualizar las estadísticas de uso de cada lenguaje.*

Expand Down
76 changes: 76 additions & 0 deletions Retos/Reto #35 - PRIMEROS PASOS [Fácil]/python/mouredev.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Hola mundo
print("¡Hola, Python!")

# Variables
my_variable = "Esto es una variable"
my_variable = "Aquí asigno un nuevo valor a la variables"

# Tipos de datos primitivos
my_string: str = "Mi cadena de texto"
my_int: int = 1
my_float: float = 1.5
my_bool: bool = True

# Constantes
MY_CONSTANT = "No existen las constantes. Simplemente se nombran variables en mayúscula."

# Control de flujo
if my_int == 1:
print("my_int vale 1")
elif my_int == 2:
print("my_int vale 2")
else:
print("my_int no vale ni 1 ni 2")

# Estructuras
my_list: list = [my_string, my_int, my_float, my_bool]
my_tuple: tuple = (my_string, my_int, my_float, my_bool)
my_set: set = set([my_string, my_int, my_float, my_bool, my_string])
my_dictionary: dict = {"str": my_string, "int": my_int, "float": my_float, "bool": my_bool}

# Bucles
for index in range(10):
print(index)

for item in my_list:
print(item)

index = 0
while index < len(my_list):
print(my_list[index])
index += 1

# Funciones
def my_function():
print("Función simple")

def my_function_with_return() -> str:
return "Función con retorno"

def my_function_with_parm(param: int):
print(f"Función con un parámetro de valor {param}")

my_function()
print(my_function_with_return())
my_function_with_parm(256)

# Clases
class MyClass():

def __init__(self, name):
self.name = name

def hello(self):
print(f"¡Hola, {self.name}!")

my_class = MyClass("MoureDev")
print(my_class.name)
my_class.hello()

# Excepciones
try:
print(0 / 0)
except:
print("Se ha producido una excepción")
finally:
print("Siempre se ejecuta el finally")
19 changes: 19 additions & 0 deletions Retos/Reto #36 - PERMUTACIONES [Media]/ejercicio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Reto #36: Permutaciones
#### Dificultad: Media | Publicación: 04/09/23 | Corrección: 18/09/23

## Enunciado

```
/*
* Crea un programa que sea capaz de generar e imprimir todas las
* permutaciones disponibles formadas por las letras de una palabra.
* - Las palabras generadas no tienen por qué existir.
* - Deben usarse todas las letras en cada permutación.
* - Ejemplo: sol, slo, ols, osl, los, lso
*/
```
#### 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)**.

0 comments on commit 061f4d6

Please sign in to comment.