会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
longestriver
博客园
首页
新随笔
联系
订阅
管理
2023年12月26日
fly bird
摘要: import pygameimport sysimport random# 素材参考地址:https://www.aigei.com/s?q=flappy+bird&type=2d class Bird(object): """定义一个鸟类""" def __init__(self): """定义初
阅读全文
posted @ 2023-12-26 22:41 Longestriver
阅读(31)
评论(0)
推荐(0)
2023年12月20日
jieba分词《聊斋》
摘要: import jieba txt = open("聊斋志异白话简写版.txt", "r", encoding='utf-8').read()words = jieba.lcut(txt) # 使用精确模式对文本进行分词counts = {} # 通过键值对的形式存储词语及其出现的次数 for wor
阅读全文
posted @ 2023-12-20 10:24 Longestriver
阅读(21)
评论(0)
推荐(0)
2023年12月13日
爬虫作业
摘要: import requestsurl="https://www.so.com/?src=so.com"def getHTMLText(url): try: r=requests.get(url) r.raise_for_status() r.encoding="utf-8" print("text:
阅读全文
posted @ 2023-12-13 10:18 Longestriver
阅读(14)
评论(0)
推荐(0)
2023年11月23日
第三周作业
摘要: import turtle,datetime 2 def drawling(draw): 3 4 turtle.pendown() if draw else turtle.penup() 5 turtle.fd(40) 6 turtle.right(90) 7 8 def draworigin(d)
阅读全文
posted @ 2023-11-23 18:25 Longestriver
阅读(25)
评论(0)
推荐(0)
2023年10月31日
第二周作业
摘要: #03超市抹零bill=float(input("请输入商品的总价格"))print("{:.0f}".format(bill))#04成绩分差和平均值import math grade1=int(input())grade2=int(input())grade3=int(input())gap1=
阅读全文
posted @ 2023-10-31 23:29 Longestriver
阅读(28)
评论(0)
推荐(0)
Π
摘要: import time pi = 0n = 100print("第一种进度条:")t = 60print("**************带时间的进度条**************")start = time.perf_counter()for i in range(t + 1): finsh = "
阅读全文
posted @ 2023-10-31 23:06 Longestriver
阅读(69)
评论(0)
推荐(0)
公告