RosettaCodeData/Task/Averages-Root-mean-square/Python/averages-root-mean-square-1.py

7 lines
134 B
Python

>>> from math import sqrt
>>> def qmean(num):
return sqrt(sum(n*n for n in num)/len(num))
>>> qmean(range(1,11))
6.2048368229954285