Created
April 16, 2017 19:24
-
-
Save ebovio/cb5e4af54434f3eb265cfd4f297400ce 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
#Problem4 | |
def promedio(list): | |
answer = 0 | |
for i in list: | |
answer = answer + i | |
return answer/values | |
#MainProgramBelow | |
list = [] | |
values= int(input("How many values you want in the list:")) | |
for i in range(values): | |
num = float(input("Write a value: ")) | |
list.append(num) | |
print("The average of the numbers in the list is", promedio(list)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment