Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created May 16, 2020 04:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/611584ffc38045b9908f66b5ba8705b4 to your computer and use it in GitHub Desktop.
Save parzibyte/611584ffc38045b9908f66b5ba8705b4 to your computer and use it in GitHub Desktop.
"""
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