摘要: # -*- coding: utf-8 -*- import bs4 import requests from bs4 import BeautifulSoup import pandas as pd import matplotlib.pyplot as plt def getHTMLText(u 阅读全文
posted @ 2020-12-13 21:58 wenscola 阅读(126) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>菜鸟教程(runoob.com)</title> </head> <body> <h1>欢迎您的加入123</h1> <p>有你想不到的意外哦!</p> </body> <tabl 阅读全文
posted @ 2020-12-13 10:31 wenscola 阅读(80) 评论(0) 推荐(0)
摘要: import requests from bs4 import BeautifulSoup def getHTMLText(url): try: r=requests.get(url,timeout=30) soup=BeautifulSoup(r.text) r.raise_for_status( 阅读全文
posted @ 2020-12-13 10:29 wenscola 阅读(42) 评论(0) 推荐(0)
摘要: 一。 数组要比列表效率高很多 numpy高效的处理数据,提供数组的支持,python默认没有数组。pandas、scipy、matplotlib都依赖numpy。 pandas主要用于数据挖掘,探索,分析 matplotlib用于作图,可视化 scipy进行数值计算,如:积分,傅里叶变换,微积分 s 阅读全文
posted @ 2020-11-23 18:37 wenscola 阅读(38) 评论(0) 推荐(0)
摘要: from random import random def printIntro(): print("36号程序员的程序模拟两个选手A和B的排球比赛") print("程序需要A和B的能力值(以0到1之间的小数表示)") def getInputs(): a=eval(input("请输入选手A的能 阅读全文
posted @ 2020-11-21 09:39 wenscola 阅读(69) 评论(0) 推荐(0)
摘要: import jieba excludes = {"什么","一个","我们","那里","你们","如今","说道","知道","起来","姑娘","这里","出来","他们","众人","自己", "一面","只见","怎么",&quo 阅读全文
posted @ 2020-11-12 22:24 wenscola 阅读(44) 评论(0) 推荐(0)
摘要: import time import turtle as tt def drawGap(): tt.penup() tt.fd(5) def drawLine(draw): drawGap() if(draw): tt.pendown() else: tt.penup() tt.fd(50) dra 阅读全文
posted @ 2020-10-15 21:57 wenscola 阅读(90) 评论(0) 推荐(0)
摘要: from math import* from time import* scale=20 s,m,=1,2 print("执行开始".center(scale//2, "-")) start = perf_counter() for i in range(scale+1): s=sqrt((1-sq 阅读全文
posted @ 2020-10-10 15:24 wenscola 阅读(52) 评论(0) 推荐(0)
摘要: import turtle turtle.setup(650,350,200,200) turtle.penup() turtle.pensize(1) turtle.pencolor("red") turtle.fd(100) turtle.seth(30) turtle.pendown() tu 阅读全文
posted @ 2020-09-15 17:42 wenscola 阅读(248) 评论(0) 推荐(0)
摘要: import turtle turtle.forward(60) for i in range(2): turtle.right(120) turtle.forward(60) turtle.right(60) turtle.forward(60) turtle.right(120) for i i 阅读全文
posted @ 2020-09-15 17:31 wenscola 阅读(254) 评论(0) 推荐(0)