import turtle

step = 40

for i in range(8):
    for j in range(8):
        turtle.penup()
        turtle.goto(i*step, j*step)
        turtle.pendown()
        
        turtle.begin_fill()
        
        if (i+j)%2 == 0:
            turtle.color("white")
        else:
            turtle.color("black")
        
        for k in range(4):
            turtle.forward(step)
            turtle.right(90)
        turtle.end_fill()
        
turtle.done()

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-23
  • 2021-07-03
  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-27
  • 2021-11-12
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
  • 2022-02-21
相关资源
相似解决方案