2020年3月29日
摘要: 有进度条圆周率计算: 代码: import math import time scale=14 s = 1 m = 2 print("执行开始".center(scale//2, "-")) start = time.perf_counter() for i in range(scale+1): s 阅读全文
posted @ 2020-03-29 18:48 linantelope 阅读(138) 评论(0) 推荐(0) 编辑
  2020年3月11日
摘要: 1.五角星绘制 import turtle turtle.fillcolor("red") turtle.begin_fill() while True: turtle.forward(220) turtle.right(144) if abs(turtle.pos()) < 1: break tu 阅读全文
posted @ 2020-03-11 19:32 linantelope 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 一、基础概念 1、画布:画布就是turtle为我们展开用于绘图区域, 我们可以设置它的大小和初始位置。常用的画布方法有两个:screensize()和setup()。 (1)turtle.screensize(canvwidth, canvheight, bg):参数分别为画布的宽(单位像素), 高 阅读全文
posted @ 2020-03-11 18:31 linantelope 阅读(1283) 评论(0) 推荐(0) 编辑