摘要: (2) import requests from bs4 import BeautifulSoup def getUrlText(url): try: web = requests.get(url) soup = BeautifulSoup(web.text) web.raise_for_statu 阅读全文
posted @ 2020-12-13 23:26 减辞 阅读(118) 评论(0) 推荐(0)
摘要: Numpy:为大型多维数组和矩阵添加 Python 支持,并提供高级的数学函数来运算这些数组。 SciPy:基于 Numpy,汇集了一系列的数学算法和便捷的函数。它可以向开发者提供用于数据操作与可视化的高级命令和类,是构建交互式 Python 会话的强大工具。 Pandas:面向数据操作和分析的 P 阅读全文
posted @ 2020-11-22 21:31 减辞 阅读(85) 评论(0) 推荐(0)
摘要: from random import random # 打印程序介绍信息 def printIntro(): print("应统02号刘颖进行比赛分析结果:") print("这是团体赛模拟程序:") # 获得程序运行参数 def getInputs(): a = eval(input("请输入队伍 阅读全文
posted @ 2020-11-22 10:12 减辞 阅读(83) 评论(0) 推荐(0)
摘要: import jieba txt = open("D:\\浏览器下载\\西游记.txt","r",encoding = "utf-8").read() #打开文本 words = jieba.lcut(txt) #分词 counts = {} for word in words: if len(wo 阅读全文
posted @ 2020-11-15 10:42 减辞 阅读(39) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-11-15 10:01 减辞 阅读(18) 评论(0) 推荐(0)
摘要: import turtle as t import time def popspace(): #单管间隔 t.penup() t.fd(5) def popline(draw): #画数码管 popspace() t.pendown() if draw else t.penup() t.fd(40) 阅读全文
posted @ 2020-10-18 23:53 减辞 阅读(61) 评论(0) 推荐(0)
摘要: import turtle number = int(input()) turtle.screensize(600,500,'white') turtle.pensize(3) turtle.pencolor('blue') turtle.fillcolor('yellow') turtle.beg 阅读全文
posted @ 2020-09-28 20:53 减辞 阅读(64) 评论(0) 推荐(0)
摘要: rmin=eval(input()) number=eval(input()) color=input() import turtle as t t.pencolor(color) t.pensize(4) for i in range (number): t.circle(rmin) rmin=r 阅读全文
posted @ 2020-09-28 20:49 减辞 阅读(106) 评论(0) 推荐(0)
摘要: import turtle as t t.pencolor("black") t.fd(200) t.seth(120) t.fd(200) t.seth(-120) t.fd(200) t.seth(0) t.fd(100) t.seth(60) t.fd(100) t.seth(180) t.f 阅读全文
posted @ 2020-09-28 20:44 减辞 阅读(96) 评论(0) 推荐(0)
摘要: import turtle turtle.speed(30) turtle.penup() off = True for y in range(-40, 30 + 1, 10): for x in range(-40, 30 + 1, 10): if off: turtle.goto(x, y) t 阅读全文
posted @ 2020-09-28 20:41 减辞 阅读(102) 评论(0) 推荐(0)