Created
May 5, 2020 00:34
-
-
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.
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 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