Advertisement
Guest User

Turtle checkboard

a guest
Nov 28th, 2011
847
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. import turtle as t
  4.  
  5. if __name__ == '__main__':
  6.     GRID_SIZE = 2
  7.     SQUARE_SIZE = 60
  8.     for row in range(GRID_SIZE):
  9.         for col in range(GRID_SIZE):
  10.             t.setpos(col * SQUARE_SIZE, row * SQUARE_SIZE)
  11.             t.pendown()
  12.             for i in range(4):
  13.                 t.forward(60)
  14.                 t.left(90)
  15.             t.penup()
  16.  
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement