摘要: import turtle as p def drawCircle(x,y,c='red'): p.pu()# 抬起画笔 p.goto(x,y) # 绘制圆的起始位置 p.pd()# 放下画笔 p.color(c)# 绘制c色圆环 p.circle(30,360) #绘制圆:半径,角度 p.pens 阅读全文
posted @ 2020-09-28 18:53 εε 阅读(163) 评论(0) 推荐(0)
摘要: from turtle import * # 设置窗体的大小和位置,参数依次为窗体的宽、高、相对于桌面起始点的横坐标、纵坐标 setup(600,400,500,200) # 画笔颜色 color("red") # 画笔宽度 pensize(5) # 画一个半径为20的圆 circle(20) # 阅读全文
posted @ 2020-09-21 19:40 εε 阅读(177) 评论(0) 推荐(0)
摘要: import turtle import time turtle.pensize(4) turtle.pencolor("yellow") #画笔黄色 turtle.fillcolor("red") #内部填充红色 #绘制五角星# turtle.begin_fill() for _ in range 阅读全文
posted @ 2020-09-21 19:14 εε 阅读(249) 评论(0) 推荐(0)
摘要: import turtle as t def nose(): t.penup() t.seth(90) t.fd(100) t.pendown() t.begin_fill() t.fillcolor('black') t.seth(45) t.fd(25) t.seth(135) t.circle 阅读全文
posted @ 2020-09-20 22:28 εε 阅读(124) 评论(0) 推荐(0)
摘要: import turtle as t t.pencolor("blue") #笔触为蓝色 #绘制外部大三角形 t.fd(200) t.seth(120) t.fd(200) t.seth(-120) t.fd(200) #绘制内部小三角形 t.seth(0) t.fd(100) t.seth(60) 阅读全文
posted @ 2020-09-15 17:39 εε 阅读(60) 评论(0) 推荐(0)
摘要: import turtle turtle.penup() turtle.fd(-100) turtle.pendown() turtle.pensize(10) turtle.pencolor("green") turtle.left(30) turtle.forward(100) turtle.r 阅读全文
posted @ 2020-09-15 17:32 εε 阅读(418) 评论(0) 推荐(0)
摘要: import turtle turtle.fillcolor("red") turtle.begin_fill() while True: turtle.forward(220) turtle.right(144) if abs(turtle.pos()) < 1: break turtle.fd( 阅读全文
posted @ 2020-09-15 17:22 εε 阅读(68) 评论(0) 推荐(0)