自定义博客皮肤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 turtlefrom math import sin, cos, pibob = turtle.Turtle() # create a Turtle objectbob.delay = 0.01 # 设置延迟值def spiral(t, a, n, w=...

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

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

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

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

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

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

2020-02-23 12:27:57 476

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

##15.12.1 美化的秒表import time,pyperclipprint('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 363

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

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

2020-02-18 19:52:58 198

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

##13.6.1 PDF偏执狂import os,PyPDF2,sysos.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 441

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

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

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

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

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

2020-02-08 19:40:22 191

空空如也

空空如也

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

TA关注的人

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