摘要:
from random import random#打印程序介绍信息def printintro(): print("这个程序模拟两个选手a和b的乒乓球比赛") print("程序运行需要a和b的能力值(以0到1之间的小数表示)")#获得程序运行参数def printinputs(): a = ev 阅读全文
posted @ 2023-12-26 14:03
luzhikang
阅读(24)
评论(0)
推荐(0)
摘要:
import sysimport pygamepygame.init() # 初始化pygamesize = width, height = 640, 800screen = pygame.display.set_mode(size) # 显示窗口color = (0, 0, 0) # 设置颜色ba 阅读全文
posted @ 2023-12-26 13:36
luzhikang
阅读(20)
评论(0)
推荐(0)
摘要:
import jiebawith open('E:\西游记.txt','r',encoding='utf-8')as f: # 打开文件 txt = f.read() # 读取为txt words = jieba.lcut(txt) # 利用jieba库的lcut分词 counts={} # 创建字 阅读全文
posted @ 2023-12-26 13:12
luzhikang
阅读(31)
评论(0)
推荐(0)

浙公网安备 33010602011771号