摘要:
8.1 from random import random def printIntro(): print("这个程序模拟乒乓球比赛,分析体育竞技规律。") print("程序运行需要输入两个选手的能力值(0 - 1之间的小数)和模拟比赛的场次。") def getInputs(): a = eva 阅读全文
摘要:
from random import random,seed from time import perf_counter seed(123) DARTS = 1000 * 1000 hits = 0.0 start = perf_counter() for i in range(1, DARTS + 阅读全文
摘要:
3.6 import time a = "strating" print("{:^}".format(a),end='') for i in range(11): s = '.' * i print("{:<}".format(s),end='') time.sleep(1) print("Done 阅读全文