• + 0 comments
    def weightedMean(n,X, W):
        s=0
        for i in range(n):
            s+=X[i]*W[i]
        print(round(s/sum(W),1))