摘要: pygame小游戏 import pygame import random 初始化pygame pygame.init() 定义颜色 white = (255, 255, 255) black = (0, 0, 0) red = (213, 50, 80) green = (0, 255, 0) b 阅读全文
posted @ 2025-06-21 16:06 HeDesongfuqin 阅读(13) 评论(0) 推荐(0)
摘要: 在数据科学和科学计算领域,python因为其丰富的库生态系统而成为首选语言,例如其中的numpy,scipy,pandas,matplotlib构成了python科学计算的核心工具。 接下来我将报告这四个库的基本用法和实际应用。 首先是numpy,它是python中科学计算的基础库,提供了高效的多维 阅读全文
posted @ 2025-06-21 16:03 HeDesongfuqin 阅读(12) 评论(0) 推荐(0)
摘要: import jieba from collections import Counter 读取《红楼梦》文本文件 def read_file(filename): with open(filename, 'r', encoding='utf-8') as f: text = f.read() ret 阅读全文
posted @ 2025-06-21 15:36 HeDesongfuqin 阅读(11) 评论(0) 推荐(0)