会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
山自山
博客园
首页
新随笔
联系
订阅
管理
2020年12月13日
爬虫作业
摘要: 描述 (2)请用requests库的get()函数访问如下一个网站20次,打印返回状态,text()内容,计算text()属性和content属性所返回网页内容的长度。(不同学号选做如下网页,必做及格)
阅读全文
posted @ 2020-12-13 22:23 山自山
阅读(78)
评论(0)
推荐(0)
2020年11月22日
numpy、scipy、pandas、matplotlib的读书报告:
摘要: 1、基本函数用法 Numpy: 基础的数学计算模块,来存储和处理大型矩阵,比Python自身的嵌套列表(nested list structure)结构要高效的多,本身是由C语言开发。这个是很基础的扩展,其余的扩展都是以此为基础。数据结构为ndarray,一般有三种方式来创建。 Scipy: 方便、
阅读全文
posted @ 2020-11-22 23:36 山自山
阅读(53)
评论(0)
推荐(0)
体育竞技分析羽毛球
摘要: 一、羽毛球比赛规则 1. 21 分制,3局2胜为佳 2. 每球得分制
阅读全文
posted @ 2020-11-22 23:19 山自山
阅读(436)
评论(0)
推荐(0)
2020年11月15日
聊斋相关的分词,出现次数最高的20个
摘要: import jieba txt = open("聊斋志异白话简写版.txt", "r", encoding='utf-8').read() words = jieba.lcut(txt) # 使用精确模式对文本进行分词 counts = {} # 通过键值对的形式存储词语及其出现的次数 for w
阅读全文
posted @ 2020-11-15 01:17 山自山
阅读(179)
评论(0)
推荐(0)
2020年10月31日
在终端输出如下信息,(两种以上方法)
摘要: 第一种 class person: def kanchai(): print("小明,10岁,男,上山去砍柴") def kaiche(): print("小明,10岁,男,开车去东北") def dayouxi(): print("小明,10岁,男,最爱打游戏") no1 = person.kan
阅读全文
posted @ 2020-10-31 17:56 山自山
阅读(76)
评论(0)
推荐(0)
2020年10月18日
7段数码管绘制
摘要: import turtle as t import time def pen(): t.up() t.fd(6) t.down() def drawline(draw): #绘制单段数码管 pen() t.pendown() if draw else t.penup() # draw 为真则执行 p
阅读全文
posted @ 2020-10-18 19:59 山自山
阅读(154)
评论(0)
推荐(0)
2020年10月11日
用python计算圆周率PI
摘要: 代码如下: 1 import math 2 import time 3 scale=10 4 print("执行开始") 5 t=time.process_time() 6 for i in range(scale+1): 7 a,b='**'*i,'..'*(scale-i) 8 c=(i/sca
阅读全文
posted @ 2020-10-11 00:04 山自山
阅读(342)
评论(0)
推荐(0)
2020年9月21日
python turtle库的学习笔记---太阳花
摘要: 1 import turtle 2 import time 3 4 # 同时设置pencolor=color1, fillcolor=color2 5 turtle.color("red", "yellow") 6 7 turtle.begin_fill() 8 for i in range(50)
阅读全文
posted @ 2020-09-21 14:03 山自山
阅读(187)
评论(0)
推荐(0)
2020年9月14日
叠加等边三角形
摘要: 1 import turtle as t 2 t.pencolor("black") 3 4 t.fd(200) 5 t.seth(120) 6 t.fd(200) 7 t.seth(-120) 8 t.fd(200) 9 10 t.seth(0) 11 t.fd(100) 12 t.seth(60
阅读全文
posted @ 2020-09-14 23:06 山自山
阅读(113)
评论(0)
推荐(0)
六角形
摘要: 1 import turtle 2 3 turtle.left(30) 4 turtle.forward(144) 5 6 turtle.right(60) 7 turtle.forward(144) 8 9 turtle.right(60) 10 turtle.forward(144) 11 12
阅读全文
posted @ 2020-09-14 22:59 山自山
阅读(218)
评论(0)
推荐(0)
下一页
公告