Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created August 6, 2018 23:14
Funciones con argumentos variable. OrtizOL.
def calcular_promedio(valor, *otros):
return (valor + sum(otros)) / (1 + len(otros))
print(calcular_promedio(2, 3))
print(calcular_promedio(2, 3, 5, 7))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment