摘要: 模拟乒乓球比赛 import random #引用random库 def sportgame(): print("Welcome to the sportgame") print("这个程序将模拟乒乓球比赛") #介绍程序 def InputPlayer(): player1 = eval(inpu 阅读全文
posted @ 2023-12-28 22:23 wdnmd15913 阅读(15) 评论(0) 推荐(0)
摘要: 引用jiaba库 点击查看代码 import jieba 读取文件,文件路径填写文件放取的位置 并且使用jieba分词的精确模式 点击查看代码 txt = open('西游记.txt', 'r', encoding='utf-8').read() words = jieba.lcut(txt) co 阅读全文
posted @ 2023-12-26 20:00 wdnmd15913 阅读(68) 评论(0) 推荐(0)