摘要: from random import random #第一阶段 def printIntro(): print("模拟两个选手A和B的羽毛球比赛") print("程序运行需要A和B的能力值(以0到1之间的小数表示)") def getInputs(): a = eval(input("请输入选手A 阅读全文
posted @ 2021-11-14 11:55 giMh、Np 阅读(95) 评论(0) 推荐(0)
摘要: import jieba txt = open("聊斋志异白话简写版.txt", "r", encoding='utf-8').read() words = jieba.lcut(txt) # 使用精确模式对文本进行分词 counts = {} # 通过键值对的形式存储词语及其出现的次数 for w 阅读全文
posted @ 2021-11-14 11:44 giMh、Np 阅读(141) 评论(0) 推荐(0)
摘要: import jieba txt = open("聊斋志异白话简写版.txt", "r", encoding='utf-8').read()words = jieba.lcut(txt) # 使用精确模式对文本进行分词counts = {} # 通过键值对的形式存储词语及其出现的次数 for wor 阅读全文
posted @ 2021-11-14 11:37 giMh、Np 阅读(247) 评论(0) 推荐(0)