摘要: 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)
摘要: pi = 0N = 100for k in range(N):pi += 1/pow(16, k) * (4 / (8 * k + 1) - 2 /(8 * k + 4) - 1/(8 * k + 5) - 1 /(8 * k + 6))print("圆周率值是:{}".format(pi)) 阅读全文
posted @ 2021-10-17 00:57 giMh、Np 阅读(212) 评论(0) 推荐(0)
摘要: money_all=56.00+72.00+88.50+26.30+68.50 money_all_str=str(money_all) print("商品总金额为:"+money_all_str)money_real=int(money_all)money_real_str= str(money_ 阅读全文
posted @ 2021-09-16 01:12 giMh、Np 阅读(48) 评论(0) 推荐(0)
摘要: 感觉python比c++更为简单, 而且python的功能性比较强, python也能为了世界最广泛使用的编程软件, 阅读全文
posted @ 2021-09-06 20:52 giMh、Np 阅读(24) 评论(0) 推荐(0)
摘要: print(''' * * * * * @ @ * * * * @ * * * * * 20203101431**''') 阅读全文
posted @ 2021-09-06 20:34 giMh、Np 阅读(140) 评论(0) 推荐(0)