Last active
December 16, 2015 05:28
-
-
Save ricardosiri68/5384377 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
# max es una funcion nativa de paython asi que | |
# no la podes usar como nombre de variable | |
def maximo(lista,i=0,m=0): | |
if i == len(lista) - 1: | |
return m | |
else: | |
if lista[i]>=m: | |
m=lista[i] | |
return maximo(lista,i+1,m) | |
lista=[1,50,60,5] | |
print maximo(lista) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment