Here's mine with nothing fancy:
def my_average(listin):
count, tot= 0, 0
for i in listin:
count=count+1
tot=tot+i
average = tot/count
return(average)
my_list = [1,8,3,6,2,345,-23,7]
answer = my_average(my_list)
print(answer)
Result:
43.625
You are viewing a single comment's thread from: