zt=input("请输入字体:")
ztds=input("请输入字体大小:")
def yid(x,y):
penup()
goto( x,y )
pendown()
def 移动(i):
pu()
fd(i)
pd()
def 画线(x,y,xi,yi):
yid(x,y)
goto(xi,yi)
def 画矩形(x,y):
x = x*x_xishu-300
y = y*y_xishu
begin_fill()
画线(x-10,-250,x-10,y-250)
画线(x-10,y-250,x+10,y-250)
画线(x+10,y-250,x+10,-250)
画线(x+10,-250,x-10,-250)
end_fill()
def 画多个矩形():
for i in range(j):
画矩形(i,counts[i])
def 文字(x,y,t,s):
pu()
goto(x,y)
pd()
write(t,False,'center',font=(zt,s,'normal'))
def 画柱状图():
画多个矩形()
for i in range(j):
文字(i*x_xishu-300,-280,words[i],ztds)
文字(i*x_xishu-300,counts[i]*y_xishu-230,counts[i],ztds)
文字(0,250,'单词频次统计图',50)
def 删除符号(a):
for i in a: #变量i依次取到序列a中每一个元素
if i in """`’~!@#$%^&*()_+-={}|[]\;',./:"<>? """:
#如果i是这些符号的一员
a=a.replace(i,' ') #将i替换为空格
return a #返回a
#改文章
files_a= '''[1] T. Paulay and J. R. Binney. Diagonally Reinforced coupling beams of shear Walls[S].ACI Special Publication 42, Detroit, 1974, 2: 579-598[2] Lam WY, Su R K L, Pam H J. Experimental study of plate-reinforced composite deep coupling beams[J]. Structural Design Tall Special Building, 2009(18): 235-257[3] ACI 318-02: Building Code Requirements for Structural Concrete, ACI318R-02:Commentary, An ACI Standard, reported by ACI Com-mittee318, American Concete Institute, 2002[4] Siu W H, Su R K L. Effects of plastic hi
画柱状图(查看英文文章单词出现频次)
最新推荐文章于 2025-04-29 15:28:57 发布