Skip to content

Instantly share code, notes, and snippets.

@ebovio
Created April 16, 2017 19:24
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 ebovio/cb5e4af54434f3eb265cfd4f297400ce to your computer and use it in GitHub Desktop.
Save ebovio/cb5e4af54434f3eb265cfd4f297400ce to your computer and use it in GitHub Desktop.
#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