摘要: import requestsfor i in range (20): print("第",i+1,"次访问") r=requests.get("https://cn.google.com/") r.encoding='utf-8' print("返回状态:",r.status_code) prin 阅读全文
posted @ 2020-12-14 20:02 达尔文的第三人称 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-11-23 08:04 达尔文的第三人称 阅读(40) 评论(0) 推荐(0) 编辑
摘要: import randomn=int(input())b=input()random.seed(b)for x in range(n): keySn = [] for i in range(5): s = '' characters = 'BCEFGHJKMPQRTVWXY2346789' for 阅读全文
posted @ 2020-10-19 19:26 达尔文的第三人称 阅读(789) 评论(0) 推荐(0) 编辑
摘要: nn= ( 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2, 1 )id = input()sum = 0for i in range(17): sum = sum + nn[i] * int(id[i])a=sum % 11if(a==2): 阅读全文
posted @ 2020-10-19 19:25 达尔文的第三人称 阅读(278) 评论(0) 推荐(0) 编辑
摘要: from datetime import*now = datetime.now().yearn = str(input())print('你出生于{}年{}月{}日'.format(n[6:10],n[10:12],n[12:14]))age = now - eval(n[6:10])print(' 阅读全文
posted @ 2020-10-19 19:23 达尔文的第三人称 阅读(100) 评论(0) 推荐(0) 编辑
摘要: x=float(input())m1=m2=0if (x<0): print("error")else: n=x-5000 if (x==0): m1=m2=0 elif (n<=3000): n=abs(n) m1=n*0.03 m2=n-m1+5000 elif(3000<n<=12000): 阅读全文
posted @ 2020-10-19 19:13 达尔文的第三人称 阅读(121) 评论(0) 推荐(0) 编辑
摘要: import math from tqdm import tqdm import time total,s,n,t=0.0,1,1.0,1.0 while(math.fabs(t)>=1e-6): total+=t n+=2 s=-s t=s/n k=total*4 print("π值是{:.10f 阅读全文
posted @ 2020-10-19 19:11 达尔文的第三人称 阅读(73) 评论(0) 推荐(0) 编辑
摘要: n=int(input())f=2a=1for i in range(2,n+1): a*=i f+=1/aprint('%.8f' %f) 阅读全文
posted @ 2020-10-19 19:08 达尔文的第三人称 阅读(214) 评论(0) 推荐(0) 编辑
摘要: a=eval(input())b=eval(input())c=eval(input())if((a*a+b*b==c*c)or(a*a+c*c==b*b)or(b*b+c*c==a*a)): print("YES")else: print("NO") 阅读全文
posted @ 2020-10-19 19:07 达尔文的第三人称 阅读(155) 评论(0) 推荐(0) 编辑
摘要: try: a=input() if a [-1] in ['c','C']: f=1.8*eval(a[0:-1])+32 print("{:.2f}F".format(f)) elif a [-1] in ['f','F']: c=(eval(a[0:-1])-32)/1.8 print("{:. 阅读全文
posted @ 2020-10-19 19:06 达尔文的第三人称 阅读(169) 评论(0) 推荐(0) 编辑