摘要: import csv import os import requests from bs4 import BeautifulSoup AllUniv = [] def getHTMLText(url): try: r = requests.get(url, timeout=30) r.raise_f 阅读全文
posted @ 2020-12-14 19:00 陈志锋1 阅读(75) 评论(0) 推荐(0)
摘要: from random import random def printIntro(): #打印程序介绍信息 print("乒乓球竞技分析") print("这个程序模拟两个队伍A和B乒乓球比赛") print("程序运行需要队伍A和队伍B的能力值(以0到1之间的小数表示)") def getInpu 阅读全文
posted @ 2020-11-23 00:52 陈志锋1 阅读(125) 评论(0) 推荐(0)
摘要: import jieba def takeSecond(elem): return elem[1] def main(): path = "C:/Users/陈志锋/Desktop/西游记.txt" file = open(path,"r",encoding="utf-8") text=file.r 阅读全文
posted @ 2020-11-14 01:01 陈志锋1 阅读(81) 评论(0) 推荐(0)
摘要: #8.程序设计题-面向对象和面对过程 #(1) print('小明,10岁,男,上山去砍柴') print('小明,10岁,男,开车去东北') print('小明,10岁,男,最爱打游戏\n') print('老李,90岁,男,上山去砍柴') print('老李,90岁,男,开车去东北') prin 阅读全文
posted @ 2020-10-29 20:21 陈志锋1 阅读(59) 评论(0) 推荐(0)
摘要: #12.7段数码管绘制 import time import turtle as tt # 绘制间隔 def drawGap(): tt.penup() tt.fd(5) # 绘制单段数码管 def drawLine(draw): drawGap() if (draw): tt.pendown() 阅读全文
posted @ 2020-10-19 01:50 陈志锋1 阅读(76) 评论(0) 推荐(0)
摘要: from random import random from time import perf_counter DARTS = 1000*1000*10 hits = 0.0 start = perf_counter() for i in range(1, DARTS+1): x, y = rand 阅读全文
posted @ 2020-10-11 02:40 陈志锋1 阅读(114) 评论(0) 推荐(0)
摘要: import turtle as a a.left(90) a.fd(150) for i in range(2): a.right(120) a.fd(300) a.right(120) a.fd(150) a.penup() a.fd(50) a.pendown() a.left(120) a. 阅读全文
posted @ 2020-09-15 14:05 陈志锋1 阅读(165) 评论(0) 推荐(0)
摘要: import turtle as a a.left(60) a.fd(200) for i in range(2): a.right(120) a.fd(400) a.right(120) a.fd(200) a.right(60) a.fd(200) for i in range(2): a.ri 阅读全文
posted @ 2020-09-15 13:49 陈志锋1 阅读(98) 评论(0) 推荐(0)
摘要: import turtle as a a.fillcolor("red") a.begin_fill() for i in range(5): a.fd(100) a.right(144) a.end_fill() a.done() 阅读全文
posted @ 2020-09-15 13:45 陈志锋1 阅读(44) 评论(0) 推荐(0)