摘要: 2)请用requests库的get()函数访问如下一个网站20次,打印返回状态,text()内容,计算text()属性和content属性所返回网页内容的长度。(不同学号选做如下网页,必做及格)‪‬‪‬‪‬‪‬‪‬‮‬‫‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‭‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‭‬‪‬‪‬‪‬‪ 阅读全文
posted @ 2020-12-12 22:45 oujin 阅读(149) 评论(0) 推荐(0)
摘要: Numpy: 基础的数学计算模块,以矩阵为主,纯数学。 SciPy: 基于Numpy,提供方法(函数库)直接计算结果,封装了一些高阶抽象和物理模型。比方说做个傅立叶变换,这是纯数学的,用Numpy;做个滤波器,这属于信号处理模型了,在Scipy里找。 Pandas: 提供了一套名为DataFrame 阅读全文
posted @ 2020-11-22 22:09 oujin 阅读(255) 评论(0) 推荐(0)
摘要: from random import random def printIntro(): print("36号程序员的程序模拟两个选手A和B的排球比赛") print("程序需要A和B的能力值(以0到1之间的小数表示)") def getInputs(): a=eval(input("请输入选手A的能 阅读全文
posted @ 2020-11-16 20:02 oujin 阅读(129) 评论(0) 推荐(0)
摘要: import jieba #添加jieba分词 mydict = ['琏二奶奶','凤哥儿','凤丫头','宝姑娘','颦儿','二姑娘','三姑娘','四姑娘','云妹妹','蓉大奶奶'] for item in mydict: jieba.add_word(item) txt = open('红 阅读全文
posted @ 2020-11-14 19:33 oujin 阅读(113) 评论(0) 推荐(0)
摘要: 练习一:在终端输出如下信息‪‬‪‬‪‬‪‬‪‬‮‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‭‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‭‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‮‬ 小明,10岁,男,上山去砍柴 小明,10岁,男,开车去东北 小明,10岁,男,最 阅读全文
posted @ 2020-10-27 17:35 oujin 阅读(191) 评论(0) 推荐(0)
摘要: turtle.setup(width,height,startx,starty) 使用turtle的setup函数,可以在屏幕中生成一个窗口(窗体),设置窗体的大小和位置,这个窗口就是画布的范围。画布的最小单位是像素,屏幕的坐标系以左上角为原点(0,0)分布。 setup的四个参数分别指的是 wid 阅读全文
posted @ 2020-10-20 16:12 oujin 阅读(504) 评论(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 @ 2020-10-20 16:03 oujin 阅读(149) 评论(0) 推荐(0)
摘要: import turtle, datetime def drawGap(): # 绘制数码管间隔 turtle.penup() turtle.fd(5) def drawLine(draw): # 绘制单段数码管 drawGap() turtle.pendown() if draw else tur 阅读全文
posted @ 2020-10-20 15:43 oujin 阅读(233) 评论(0) 推荐(0)
摘要: import turtle turtle.setup(650,350,200,200) turtle.penup() turtle.pensize(1) turtle.pencolor("red") turtle.fillcolor("purple") turtle.begin_fill() tur 阅读全文
posted @ 2020-09-14 23:11 oujin 阅读(1598) 评论(0) 推荐(0)
摘要: import turtle turtle.setup(650,350,200,200) turtle.penup() turtle.pensize(1) turtle.pencolor("red") turtle.fillcolor("yellow") turtle.fd(100) turtle.s 阅读全文
posted @ 2020-09-14 23:07 oujin 阅读(1363) 评论(0) 推荐(0)