Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Last active December 27, 2020 02:14
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/ab9c1089ed89a8f82fcc0560aaef89be to your computer and use it in GitHub Desktop.
Save parzibyte/ab9c1089ed89a8f82fcc0560aaef89be to your computer and use it in GitHub Desktop.
def obtener_media(arreglo):
# La media es básicamente el promedio
sumatoria = 0
for valor in arreglo:
sumatoria += valor
longitud = len(arreglo)
return sumatoria / longitud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment