Created
May 16, 2020 04:51
-
-
Save parzibyte/611584ffc38045b9908f66b5ba8705b4 to your computer and use it in GitHub Desktop.
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
""" | |
https://parzibyte.me/blog | |
""" | |
import random | |
def generar_lista_enteros(minimo, maximo, longitud): | |
return [random.randint(minimo, maximo) for _ in range(longitud)] | |
def generar_lista_flotantes(minimo, maximo, longitud): | |
return [random.uniform(minimo, maximo) for _ in range(longitud)] | |
enteros_aleatorios = generar_lista_enteros(1, 10, 5) | |
print("Enteros: " + str(enteros_aleatorios)) | |
flotantes_aleatorios = generar_lista_flotantes(20, 100, 5) | |
print("Flotantes: " + str(flotantes_aleatorios)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment