01 2021 档案
摘要:def PI(n): pi=0 for 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)) return pi import time scale = 20 print("执行开始".center(sc
阅读全文
摘要:import turtle, datetime def drawGap(): # 绘制数码管间隔 turtle.penup() turtle.fd(5) def drawLine(draw): # 绘制单段数码管 drawGap() turtle.pendown() if draw else tur
阅读全文
摘要:from random import random def printIntro(): print("36号程序员的程序模拟两个选手A和B的排球比赛") print("程序需要A和B的能力值(以0到1之间的小数表示)") def getInputs(): a=eval(input("请输入选手A的能
阅读全文
摘要:import requests for i in range (20): print("第",i+1,"次访问") r=requests.get("https://www.google.cn/") r.encoding='utf-8' print("返回状态:",r.status_code) pri
阅读全文

浙公网安备 33010602011771号