12画图

#___author:  
#date: 2021/6/11
#画圆
import turtle
t = turtle.Pen()
my_colos='red','green','yellow','black'
t.width(4)
t.speed(0)
for i in range(1000):
t.penup()
t.goto(0, -i*10)
t.pendown()
t.color(my_colos[i%len(my_colos)])
t.circle(15+i*10)


turtle.done() #程序执行完,窗口任然在

#画棋盘
# x1 = [(-400,400),(-400+30*18,400)]
# y1 = [(-400,400),(-400,400-30*18)]
# t = turtle.Pen()
# t.speed(0)
# for i in range(0,19):# 1 2 3
# t.penup()
# t.goto(x1[0][0],x1[0][1]-30*i)
# t.pendown()
# t.goto(x1[0][1],x1[1][1]-30*i)
# for x in range(0,19):
# t.penup()
# t.goto(y1[0][0]+30*x,y1[0][1])
# t.pendown()
# t.goto(y1[0][0]+30*x,y1[1][1])
# turtle.done()
posted @ 2021-07-28 09:23  幻奇  阅读(68)  评论(0)    收藏  举报