摘要: import turtle as t t.setup() t.pensize(5) for i in range(4): t.fd(150) t.right(90) t.circle(-150,45) t.right(90) t.fd(150) t.right(225) t.done() 阅读全文
posted @ 2020-10-19 19:49 石榴海豹 阅读(81) 评论(0) 推荐(0)
摘要: import turtle as t t.setup(650,350,200,200) t.pu() t.fd(50) t.left(-90) t.fd(100) t.right(90) t.pd() t.pensize(5) t.pencolor("black") for i in range(9 阅读全文
posted @ 2020-10-19 19:45 石榴海豹 阅读(133) 评论(0) 推荐(0)
摘要: import turtle turtle.setup(650, 350, 200, 200) turtle.penup() turtle.fd(-250) turtle.pendown() turtle.pensize(2) turtle.pencolor("black") turtle.fd(50 阅读全文
posted @ 2020-10-19 19:41 石榴海豹 阅读(83) 评论(0) 推荐(0)
摘要: import turtle as t t.pensize(2) for i in range(4): t.fd(150) t.left(90) 阅读全文
posted @ 2020-10-19 19:32 石榴海豹 阅读(77) 评论(0) 推荐(0)
摘要: import turtle def drawSnake(rad,angle,len,neckrad): for i in range(len): turtle.circle(rad,angle) #turtle.circle()函数功能:rad——半径,angle——小乌龟沿着圆形爬行的弧度值。 t 阅读全文
posted @ 2020-10-19 19:24 石榴海豹 阅读(131) 评论(0) 推荐(0)
摘要: import turtle as t import time def popspace(): #单管间隔 t.penup() t.fd(4) def popline(draw): #画数码管 popspace() t.pendown() if draw else t.penup() t.fd(40) 阅读全文
posted @ 2020-10-18 21:52 石榴海豹 阅读(130) 评论(0) 推荐(0)
摘要: n=eval(input()) a=1 for i in range(1,1000000): if (1/(2*i+1))>=n: a=((-1)**i)*(1/(2*i+1))+a else: break pi=a*4 print("{:.6f}".format(pi)) 阅读全文
posted @ 2020-10-11 09:04 石榴海豹 阅读(86) 评论(0) 推荐(0)
摘要: import turtle t=turtle.Turtle() t.penup() t.goto(0,-50)#设置起始坐标 t.pendown() t.begin_fill() t.fillcolor('black') t.circle(150,extent=180) t.circle(75,ex 阅读全文
posted @ 2020-10-08 21:34 石榴海豹 阅读(103) 评论(0) 推荐(0)
摘要: import turtle turtle.width(10) turtle.color('black') turtle.circle(50) turtle.penup() turtle.goto(120,0) turtle.pendown() turtle.color('red') turtle.c 阅读全文
posted @ 2020-10-08 21:29 石榴海豹 阅读(200) 评论(0) 推荐(0)
摘要: import turtle turtle.screensize(800,800) turtle.setup(800,500,100) turtle.penup() turtle.fd(-100) turtle.pendown() turtle.pensize(7) turtle.pencolor(" 阅读全文
posted @ 2020-10-08 21:26 石榴海豹 阅读(172) 评论(0) 推荐(0)