def Total(E):
    N=len(E)
    T=0
    for i in range(N):
        T=T+E[i]
    return T

def Sommeprod(S,E):
    N=len(E)
    P=0
    for i in range(N):
        P=P+S[i]*E[i]
    return P

def MoyenneP(S,E):
    m=Sommeprod(S,E)/Total(E)
    return m

from math import*

def Ecarttype(S,E):
    N=len(E)
    SC=0
    m=MoyenneP(S,E)
    for i in range(N):
        SC=SC+E[i]*(S[i]-m)**2
    s=...
    return s
