自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 《Think Python》练习4-5:用turtle画螺线

要求:阅读螺线(spiral)的相关知识; 然后编写一个绘制阿基米德螺线(或者其他种类的螺线)的程序。 阿基米德螺线 import turtle from math import sin, cos, pi bob = turtle.Turtle() # create a Turtle object bob.delay = 0.01 # 设置延迟值 def spiral(t, a, n, w=...

2020-04-01 11:00:41 1122 1

原创 《Python编程快速上手—让繁琐工作自动化》第17章

17.7.3 定制的座位卡——《Python编程快速上手—让繁琐工作自动化》第17章

2020-03-01 19:04:34 356 1

原创 《Python编程快速上手—让繁琐工作自动化》第16章

##16.2 发送电子邮件 import smtplib from_addr = input('输入新浪邮箱:') to_addr = input('输入收件人邮箱:') password = input('输入授权码:') smtp_server = 'smtp.sina.com' msg = """ to:%s from:%s Subject:Hello\n Hello! This is ...

2020-02-23 12:27:57 469

原创 《Python编程快速上手—让繁琐工作自动化》第15章实践项目

##15.12.1 美化的秒表 import time,pyperclip print('Press ENTER to begin. Afterwards, press ENTER to click the stopwatch,\ Press Ctrl-C to quit.') input() print('Started') startTime = time.time() lastTime =...

2020-02-20 16:19:45 358

原创 《Python编程快速上手—让繁琐工作自动化》第14章实践项目

##14.8 Excel 到 CSV 的转换程序 from openpyxl import load_workbook import csv,os for excelFile in os.listdir('.'): if not excelFile.endswith('.xlsx'): continue wb = load_workbook(excelFile,d...

2020-02-18 19:52:58 194

原创 《Python编程快速上手—让繁琐工作自动化》第13章实践项目

##13.6.1 PDF偏执狂 import os,PyPDF2,sys os.chdir(r'C:\Users\Yuno\Desktop') for foldername,subfoldernames,filenames in os.walk('.'): #遍历当前工作目录找到pdf文件 for filename in filenames: if filename.en...

2020-02-18 19:45:10 434

原创 《Python编程快速上手—让繁琐工作自动化》第12章实践项目

##12.13.1 乘法表 ###法一 from openpyxl.workbook import Workbook from openpyxl.styles import Font n = int(input('Put an integer :')) wb = Workbook() ws = wb.active ws.freeze_panes = 'B2' f = Font(bold=True...

2020-02-16 18:36:02 627 4

原创 《Python编程快速上手—让繁琐工作自动化》第9章实践项目

##9.8.1选择性拷贝 import os, shutil direction = os.path.join(os.getcwd(), 'copylist') os.makedirs(direction) for foldername, subfoldernames, filenames in os.walk(r"...

2020-02-08 19:40:22 187

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除