ppt折线图增加一条线,python中import用法
开展mtdkf
来自导入工厂
import numpy as np
import matplotlib.pyplot as plt
阶乘
deffact(n ) :
返回工厂(n )。
#Catalan公爵wxdjz/pdefcat_direct(n ) :
返回fact (2* n )/fact (n1 )/fact (n ) )。
max=20
Nist=范围(25 ) )。
print ' enterthelimitforcatalannumberstobeprinted 3360100000000 '
for i in nList:
if i=max:
val=cat_direct(I )
print 'C %s is:'%i,val
else:
打印' c % s is : ' % I,10000000000
--- 62616964757 a 686964616 Fe 4b 893 e 5b 19e 313337396264生成曲线
PLT.plot(nlist、valList、' ro ' ) )。
PLT.axis ([ 0,25,0,10000000 ]
PLT.xlabel('n ) ) ) )。
PLT.ylabel(Catalan ) )。
PLT.title(cn1=2* )2n1 (cn/(N2 ) ) )
plt.show () )