Skip to content

Instantly share code, notes, and snippets.

@alphanetEX
Created May 5, 2020 00:34
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 alphanetEX/6fd7267591c3aa9c4db9c608bab355c1 to your computer and use it in GitHub Desktop.
Save alphanetEX/6fd7267591c3aa9c4db9c608bab355c1 to your computer and use it in GitHub Desktop.
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