Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from turtle import*
- def tttDrawGrid():
- ttt = Turtle()
- ttt.speed(10)
- ttt.width(10)
- ttt.color('blue')
- ttt.up()
- ttt.right(180)
- ttt.forward(150)
- ttt.right(90)
- ttt.forward(100)
- ttt.right(90)
- ttt.down()
- ttt.forward(300)
- ttt.up()
- ttt.right(180)
- ttt.forward(100)
- ttt.right(90)
- ttt.forward(100)
- ttt.right(180)
- ttt.down()
- ttt.forward(300)
- ttt.up()
- ttt.right(180)
- ttt.forward(100)
- ttt.right(90)
- ttt.forward(100)
- ttt.right(180)
- ttt.down()
- ttt.forward(300)
- ttt.up()
- ttt.right(180)
- ttt.forward(100)
- ttt.right(90)
- ttt.forward(100)
- ttt.right(180)
- ttt.down()
- ttt.forward(300)
- def tttDrawX():
- t = Turtle()
- t.up()
- x = input("Choose a row between 0-2: ")
- x = int(x)
- x = x-1
- y = input("Choose a coluumn between 0-2: ")
- y = int(y)
- t.goto(x*100-35,y*100-12)
- t.down()
- t.right(45)
- t.forward(70*2**.5)
- t.up()
- t.left(130)
- t.forward(70)
- t.left(130)
- t.down()
- t.forward(70*2**.5)
- tttDrawGrid()
- tttDrawX()
Add Comment
Please, Sign In to add comment