-
-
Save parzibyte/07a6102c18baf1ae318dba9c64b7f8a1 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
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