摘要: import requestsfor _ in range(20): response = requests.get('https://www.google.com', timeout=10) print('Status:', response.status_code) print('Text:', 阅读全文
posted @ 2023-12-29 00:23 Antea 阅读(23) 评论(0) 推荐(0)
摘要: 读书报告 在本次的学习中,我深入研究了NumPy、SciPy、Pandas和Matplotlib这几个Python库。这些库在数据处理、科学计算和可视化方面发挥着重要作用。 首先,我学习了这些库的基本函数用法。NumPy提供了强大的数组处理功能,如创建数组、进行数组运算以及利用数组进行数据分析。Sc 阅读全文
posted @ 2023-12-29 00:20 Antea 阅读(58) 评论(0) 推荐(0)
摘要: from random import randomdef printInfo(): ''' function: 打印程序的介绍信息 ''' print("通过输入2个队伍A和B的能力值(0到1之间的小数表示),能够模拟多次2个队伍A和B的排球竞技比赛,从而得出各自的胜率!") print("信计1班 阅读全文
posted @ 2023-12-28 21:38 Antea 阅读(30) 评论(0) 推荐(0)
摘要: import pygameimport sysimport randomclass Bird(object): """定义一个鸟类""" def __init__(self): """定义初始化方法""" self.birdRect = pygame.Rect(65, 50, 50, 50) # 鸟 阅读全文
posted @ 2023-12-28 18:54 Antea 阅读(45) 评论(0) 推荐(0)
摘要: import jieba# 读取文本文件path = "红楼梦.txt"file = open(path, "r", encoding="GB2312",errors="ignore")text = file.read()file.close()# 使用jieba分词words = jieba.lc 阅读全文
posted @ 2023-12-21 21:37 Antea 阅读(26) 评论(0) 推荐(0)
摘要: import turtleimport datetimeimport timedef draw_gap(): # 绘制数码间隔 turtle.penup() turtle.fd(5)def draw_line(draw): # 绘制单段数码管 draw_gap() turtle.pendown() 阅读全文
posted @ 2023-11-20 19:53 Antea 阅读(31) 评论(0) 推荐(0)
摘要: 03运行超市抹零结账行为 运行代码: a=float(input('扫描的第一个商品价格:'))b=float(input('扫描的第二个商品价格:'))c=float(input('扫描的第三个商品价格:'))d=a+b+cprint('总计:',int(d))print('学号后四位:3015' 阅读全文
posted @ 2023-10-30 21:34 Antea 阅读(24) 评论(0) 推荐(0)