Saturday, 8 May 2021

Declaring and using functions: list mean

 

def mean(list):
    total = 0
    for i in list:
        total=total+i

    mean = total/len(list)
    return mean







a = [104030]
print (mean(a))

No comments:

Post a Comment