def initial(): global t t = Pen() t.pensize(1) t.pencolor('grey') t.hideturtle() t.penup() for i in range(m + 1): t.goto(point_y_up[i]) t.pendown() t.goto(point_y_down[i]) t.penup() for i in range(n + 1): t.goto(point_x_le[i]) t.pendown() t.goto(point_x_ri[i]) t.penup()
#!/usr.bin.env python from time import sleep from turtle import Pen, circle, right, pencolor, width canvas = Pen() colors = ["brown", "gray", "purple", "red"] for num in xrange(450): canvas.width(0.8) canvas.pencolor(colors[num % 4]) canvas.circle(num) canvas.right(91) sleep(500)
from turtle import Pen t=Pen() colors=['red','blue','black','green'] for i in colors: t.pencolor(i) t.forward(100) t.left(90)