摘要:
from random import random #第一阶段 def printIntro(): print("模拟两个选手A和B的羽毛球比赛") print("程序运行需要A和B的能力值(以0到1之间的小数表示)") def getInputs(): a = eval(input("请输入选手A 阅读全文
摘要:
import jieba text=open('E:/聊斋志异/聊斋志异.txt',"r",encoding='utf-8').read() words=jieba.lcut(text) counts={} for word in words: if len(word)==1: #排除带个字符的分词 阅读全文
摘要:
圆周率Pi具体公式 π/4=1-1/3+1/5-1/7+1/9-1/11+... 代码 import math import time scale=10 print("执行开始") t=time.process_time() for i in range(scale+1): a,b='**'*i,' 阅读全文