摘要: import jieba txt = open("聊斋志异白话简写版.txt", "r", encoding='utf-8').read()words = jieba.lcut(txt) # 使用精确模式对文本进行分词counts = {} # 通过键值对的形式存储词语及其出现的次数 for wor 阅读全文
posted @ 2021-11-14 10:22 百事可rina 阅读(213) 评论(0) 推荐(0)
摘要: from random import randomdef main(): printInfo() probA,probB,m,n = getInput() winsA,winsB = simNGames(m,n,probA,probB) printSummary(winsA,winsB)main() 阅读全文
posted @ 2021-11-14 10:16 百事可rina 阅读(40) 评论(0) 推荐(0)
摘要: print("\n手机店正在打折,活动进行……")strWeek=input("请输入中文星期(如星期一):")intTime=int(input("请输入时间中的小时(范围:0~23):"))if(strWeek=="星期二"and (intTime>=10 and intTime<=11))or 阅读全文
posted @ 2021-09-14 20:41 百事可rina 阅读(40) 评论(0) 推荐(0)
摘要: python=95english=92c=89print("python="+str(python)+"english"+str(english)+"c="+str(c)+"\n")print("python<english的结果:"+str(python<english))print("pytho 阅读全文
posted @ 2021-09-14 20:39 百事可rina 阅读(47) 评论(0) 推荐(0)
摘要: python=95english=92c=89sub=python-cavg=(python+english+c)/3print("Python课程和C语言课程的分数之差: "+str(sub)+" 分/n")print("3门课的平均分: "+str(avg)+"分")print("3138") 阅读全文
posted @ 2021-09-14 20:36 百事可rina 阅读(348) 评论(0) 推荐(0)
摘要: money_all=56.75+72.91+88.50+26.37+68.51money_all_str=str(money_all)print("商品总金额为:"+money_all_str)money_real=int(money_all)money_real_str=str(money_rea 阅读全文
posted @ 2021-09-13 23:59 百事可rina 阅读(23) 评论(0) 推荐(0)
摘要: print("\n手机店正在打折,活动进行……")strWeek=input("请输入中文星期(如星期一):")intTime=int(input("请输入时间中的小时(范围:0~23):"))if(strWeek=="星期二"and (intTime>=10 and intTime<=11))or 阅读全文
posted @ 2021-09-13 23:55 百事可rina 阅读(71) 评论(0) 推荐(0)
摘要: python=95english=92c=89print("python="+str(python)+"english"+str(english)+"c="+str(c)+"\n")print("python<english的结果:"+str(python<english))print("pytho 阅读全文
posted @ 2021-09-13 23:41 百事可rina 阅读(47) 评论(0) 推荐(0)
摘要: python=95english=92c=89sub=python-cavg=(python+english+c)/3print("Python课程和C语言课程的分数之差: "+str(sub)+" 分/n")print("3门课的平均分: "+str(avg)+"分") 阅读全文
posted @ 2021-09-13 23:28 百事可rina 阅读(456) 评论(0) 推荐(0)
摘要: money_all=56.75+72.91+88.50+26.37+68.51money_all_str=str(money_all)print("商品总金额为:"+money_all_str)money_real=int(money_all)money_real_str=str(money_rea 阅读全文
posted @ 2021-09-13 23:19 百事可rina 阅读(58) 评论(0) 推荐(0)