12 2023 档案

摘要:import pygameimport sysimport randomimport numpy as np class Bird(object): """定义一个鸟类""" def __init__(self): """定义初始化方法""" self.birdRect = pygame.Rect( 阅读全文
posted @ 2023-12-28 17:09 何心兑 阅读(48) 评论(0) 推荐(0)
摘要:print("02 17向悦") import numpy as np# 创建两个矩阵a = np.array([[1,2,3],[4,5,6]])b = np.array([[7,8],[9,10],[11,12]])# 计算矩阵乘积c = np.dot(a,b)# 打印结果print(c) im 阅读全文
posted @ 2023-12-28 16:49 何心兑 阅读(21) 评论(0) 推荐(0)
摘要:import jieba print("02 17向悦")# 读取文本文件path = "聊斋志异.txt"file = open(path, "r", encoding="utf-8")text = file.read()file.close() # 使用jieba分词words = jieba. 阅读全文
posted @ 2023-12-28 16:30 何心兑 阅读(6) 评论(0) 推荐(0)
摘要:import randomimport os print("2班 17向悦")# 介绍比赛以及程序def print_introduce(): print("This is a badminton game simulation program") print("The program requir 阅读全文
posted @ 2023-12-28 16:05 何心兑 阅读(117) 评论(0) 推荐(0)