摘要: 练习一:在终端输出如下信息‪‬‪‬‪‬‪‬‪‬‮‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‭‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‭‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‮‬ 小明,10岁,男,上山去砍柴 小明,10岁,男,开车去东北 小明,10岁,男,最 阅读全文
posted @ 2021-01-11 16:18 chengyi92 阅读(80) 评论(0) 推荐(0)
摘要: Numpy: 基础的数学计算模块,以矩阵为主,纯数学。 SciPy: 基于Numpy,提供方法(函数库)直接计算结果,封装了一些高阶抽象和物理模型。比方说做个傅立叶变换,这是纯数学的,用Numpy;做个滤波器,这属于信号处理模型了,在Scipy里找。 Pandas: 提供了一套名为DataFrame 阅读全文
posted @ 2021-01-11 16:17 chengyi92 阅读(100) 评论(0) 推荐(0)
摘要: def PI(n): pi=0 for k in range(n): pi += 1/pow(16,k)*(4/(8*k+1)-2/(8*k+4)-1/(8*k+5)-1/(8*k+6)) return pi import time scale = 20 print("执行开始".center(sc 阅读全文
posted @ 2021-01-11 16:15 chengyi92 阅读(63) 评论(0) 推荐(0)
摘要: (2)请用requests库的get()函数访问google网站20次,打印返回状态,text()内容,计算text()属性和content属性所返回网页内容的长度。 import requests url = 'http://www.google.cn/' #请求头 headers = {'use 阅读全文
posted @ 2020-12-14 00:10 chengyi92 阅读(61) 评论(0) 推荐(0)
摘要: # -*- encoding:utf-8 -*- ''' 模拟排球竞技 @author: bpf ''' # 比赛规则: # 1. 采用5局3胜制 # 2. 前四局采用25分制,每个队只有在赢得至少25分,且同时超过对方2分时才胜一局 # 3. 决胜局(第五局)采用15分制,先获得15分,且同时超过 阅读全文
posted @ 2020-11-21 20:12 chengyi92 阅读(47) 评论(0) 推荐(0)
摘要: import jieba excludes = {"什么","一个","我们","那里","你们","如今","说道","知道","起来","姑娘","这里","出来","他们","众人","自己", "一面","只见","怎么",&quo 阅读全文
posted @ 2020-11-14 20:30 chengyi92 阅读(73) 评论(0) 推荐(0)
摘要: import turtle as t import time def popspace(): #单管间隔 t.penup() t.fd(5) def popline(draw): #画数码管 popspace() t.pendown() if draw else t.penup() t.fd(40) 阅读全文
posted @ 2020-10-18 23:28 chengyi92 阅读(102) 评论(0) 推荐(0)
摘要: import turtle for i in range(3): turtle.forward(150) turtle.right(120) turtle.left(60) turtle.forward(150) for i in range(3): turtle.right(120) turtle 阅读全文
posted @ 2020-09-14 23:15 chengyi92 阅读(146) 评论(0) 推荐(0)
摘要: import turtle as t t.pensize(4) t.pencolor("black") t.right(30) t.forward(200) t.right(120) t.forward(300) t.right(120) t.forward(300) t.right(120) t. 阅读全文
posted @ 2020-09-14 23:14 chengyi92 阅读(123) 评论(0) 推荐(0)
摘要: import turtle turtle.pensize(0.1) turtle.pencolor("black") turtle.fillcolor("red") turtle.begin_fill() for i in range(5): turtle.forward(200) turtle.r 阅读全文
posted @ 2020-09-14 23:11 chengyi92 阅读(48) 评论(0) 推荐(0)