12 2023 档案
摘要:import pygameimport sysimport randomimport numpy as np class Bird(object): """定义一个鸟类""" def __init__(self): """定义初始化方法""" self.birdRect = pygame.Rect(
阅读全文
摘要: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
阅读全文
摘要:import jieba print("02 17向悦")# 读取文本文件path = "聊斋志异.txt"file = open(path, "r", encoding="utf-8")text = file.read()file.close() # 使用jieba分词words = jieba.
阅读全文
摘要:import randomimport os print("2班 17向悦")# 介绍比赛以及程序def print_introduce(): print("This is a badminton game simulation program") print("The program requir
阅读全文