摘要: from random import randomdef printIntro(): print("这个程序模拟两个选手A和B的兵乓球比赛") print("程序运行需要A和B的能力值(以0到1之间的小数表示)")def getInputs(): a = eval(input("请输入选手A的能力值 阅读全文
posted @ 2021-11-13 22:35 35p 阅读(41) 评论(0) 推荐(0)
摘要: import jieba txt = open("西游记.txt", "r", encoding='utf-8').read() words = jieba.lcut(txt) counts = {} for word in words: if len(word) == 1: continue el 阅读全文
posted @ 2021-11-13 22:27 35p 阅读(60) 评论(0) 推荐(0)