摘要: #(2)import requestsurl = "https://www.google.cn/"for i in range(20): try: r = requests.get(url, timeout = 30) r.raise_for_status() r.encoding = 'utf-8 阅读全文
posted @ 2023-12-16 18:00 slowdowna 阅读(14) 评论(0) 推荐(0)
摘要: import turtle, datetimedef drawLine(draw): # 绘制单段数码管 turtle.pendown() if draw else turtle.penup() turtle.fd(40) turtle.right(90)def drawDigit(digit): 阅读全文
posted @ 2023-11-23 17:44 slowdowna 阅读(53) 评论(0) 推荐(0)
摘要: #运行超市抹零结账行为money_all = 56.75 + 72.91 + 88.50 + 26.37 + 68.51print("商品总金额为:%.2f"%money_all )print("实收金额:%d"%(int(money_all)))print("学号:2022310143125")# 阅读全文
posted @ 2023-10-31 19:22 slowdowna 阅读(18) 评论(0) 推荐(0)
摘要: from random import random from math import sqrt from time import perf_counterDARTS = 10000000hits = 0.0perf_counter()for i in range(1,DARTS+1): x,y = 阅读全文
posted @ 2023-10-30 19:53 slowdowna 阅读(47) 评论(0) 推荐(0)