Restructure content and add notes from HolaMundo

Signed-off-by: Manuel Vergara <manuel@vergaracarmona.es>
This commit is contained in:
2023-05-20 09:36:26 +02:00
parent 64ed03f811
commit f4e9797c4b
430 changed files with 889 additions and 24 deletions

View File

@@ -0,0 +1,31 @@
"""
random
Necesitaremos importar métodos,
porque están en una librería llamada random
Veremos estos métodos:
randint()
uniform()
random()
choice()
shuffle()
"""
from random import *
aleatorio = randint(1, 50)
print(aleatorio)
aleatorio_float = round(uniform(1, 10),4)
print(aleatorio_float)
aleatorio_random = random()
print(aleatorio_random)
colores = ['rosa', 'verde','negro','azul']
aleatorio_choice = choice(colores)
print(aleatorio_choice)
numeros = list(range(5,50,5))
shuffle(numeros)
print(numeros)