摘要: import pygameimport sysimport randomimport numpy as np class Bird(object): """定义一个鸟类""" def __init__(self): """定义初始化方法""" self.birdRect = pygame.Rect( 阅读全文
posted @ 2023-12-28 17:09 何心兑 阅读(91) 评论(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 何心兑 阅读(42) 评论(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 何心兑 阅读(25) 评论(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 何心兑 阅读(169) 评论(0) 推荐(0)
摘要: #22信计2向悦17号 import turtle,datetime #3107def drawGap(): turtle.penup() turtle.fd(5)def drawLine(draw): drawGap() turtle.pendown() if draw else turtle.p 阅读全文
posted @ 2023-11-22 12:40 何心兑 阅读(25) 评论(0) 推荐(0)
摘要: from random import randomfrom math import sqrtfrom time import perf_counterimport time#进度条 print("2022310143117")for i in range(1, 101): print("\r", e 阅读全文
posted @ 2023-11-01 08:38 何心兑 阅读(24) 评论(0) 推荐(0)
摘要: print("学号:2022310143117") #03运行超市抹零结账行为 money_all=56.75+72.91+88.5+26.37+68.51 money_all_str=str(money_all)print("商品总金额:"+money_all_str)money_real=int 阅读全文
posted @ 2023-11-01 08:16 何心兑 阅读(17) 评论(0) 推荐(0)