Python:基本関数
5020 ワード
標準偏差を求める
def STD(f):
... s=0
... for i in range(len(f)):
... s+=f[i]
... m=s/len(f)
... e=0
... for i in range(len(f)):
... e+=(f[i]-m)**2
... se=math.sqrt(e/len(f))
... print(se)
sin関数グラフィックの描画
def rsin(n):
sa=[]
r=0.0
while r<numpy.pi*2:
sa.append(numpy.sin(r))
r+=n
plt.plot(sa)
plt.show()
>>>rsin(0.05)
Matplotlibsin関数グラフィック結果


Reference
この問題について(Python:基本関数), 我々は、より多くの情報をここで見つけました https://velog.io/@gustn2870/Python-기초-함수들テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol