Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created January 14, 2021 22:35
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/07a6102c18baf1ae318dba9c64b7f8a1 to your computer and use it in GitHub Desktop.
Save parzibyte/07a6102c18baf1ae318dba9c64b7f8a1 to your computer and use it in GitHub Desktop.
def mayor_de_arreglo(arreglo):
# Supongamos que el mayor es el primero solo para tener un valor para inicializar
mayor = arreglo[0]
# Recorrer y buscar
for elemento in arreglo:
if elemento > mayor:
mayor = elemento
return mayor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment