画国际象棋盘
1 from turtle import* 2 n=eval(input()) 3 color("black","black") 4 for i in range(4): 5 for i in range(4): 6 begin_fill() 7 fd(2*n) 8 for i in range(4): 9 left(90) 10 fd(n) 11 end_fill() 12 right(90) 13 fd(n) 14 right(90) 15 for i in range(4): 16 begin_fill() 17 fd(2*n) 18 for i in range(4): 19 right(90) 20 fd(n) 21 end_fill() 22 left(90) 23 fd(n) 24 left(90) 25 pencolor("white") 26 left(90) 27 fd(n) 28 pencolor("black") 29 fd(8*n) 30 right(90) 31 fd(8*n) 32 hideturtle()