def espva(V,P): E=0 for i in range(len(V)): E=...+...*P[i] return(E)