摘要: import pygame import time import random 初始化 Pygame pygame.init() 定义颜色 white = (255, 255, 255) yellow = (255, 255, 102) black = (0, 0, 0) red = (213, 5 阅读全文
posted @ 2025-06-21 16:26 你好book 阅读(21) 评论(0) 推荐(0)
摘要: import random import matplotlib.pyplot as plt from collections import defaultdict class TableTennisGame: def init(self, player1, player2, win_games=4) 阅读全文
posted @ 2025-06-21 15:21 你好book 阅读(26) 评论(0) 推荐(0)
摘要: import jieba import re from collections import Counter 读取《西游记》文本文件 def read_file(file_path): with open(file_path, 'r', encoding='utf-8') as file: retu 阅读全文
posted @ 2025-06-21 15:19 你好book 阅读(6) 评论(0) 推荐(0)