Skip to content

Instantly share code, notes, and snippets.

@alphanetEX
Created May 5, 2020
Embed
What would you like to do?
Crear una función que pida el ingreso de 10 números y retorne su promedio.
def numbers():
counter = 0
acumulator = 0
while counter < 10:
number = float(input("igrese el {} numero: ".format(counter+1)))
acumulator += number
counter += +1
return acumulator / counter
print("el promedio de los 10 numeros es de "+ str(numbers()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment