今天试着画了一个中国象棋棋盘!
#绘制象棋盘
import turtle
t=turtle.Pen()
t.speed(100)
def angle(x,y):
t.penup()
t.goto(x+3,y+3)
t.pendown()
t.setheading(0)
t.forward(5)
t.goto(x+3,y+3)
t.left(90)
t.forward(5)
t.penup()
t.goto(x+3,y-3)
t.pendown()
t.setheading(0)
t.forward(5)
t.goto(x+3,y-3)
t.left(90)
t.forward(-5)
t.penup()
t.goto(x-3,y+3)
t.pendown()
t.setheading(0)
t.forward(-5)
t.goto(x-3,y+3)
t.left(90)
t.forward(5)
t.penup()
t.goto(x-3,y-3)
t.pendown()
t.setheading(0)