Advertisement
here2share

# turtle_lineart.py

Aug 30th, 2018
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.12 KB | None | 0 0
  1. # turtle_lineart.py
  2.  
  3. import turtle as t
  4. t.setup(width=600, height=600)
  5. t.speed(500)
  6. t.color("lime")
  7. t.bgcolor('black')
  8. t.pu()
  9. for i in range(-300, 300, 10):
  10.     t.setpos(i,300)
  11.     t.pd()
  12.     t.setpos(300,i*-1)
  13.     t.pu()
  14.     t.setpos(i,-300)
  15.     t.pd()
  16.     t.setpos(300,i)
  17.     t.pu()
  18. for i in range(300, -300, -10):
  19.     t.setpos(i,-300)
  20.     t.pd()
  21.     t.setpos(-300,i*-1)
  22.     t.pu()
  23.     t.setpos(i,300)
  24.     t.pd()
  25.     t.setpos(-300,i)
  26.     t.pu()
  27. for i in range(0, 300, 10):
  28.     t.setpos(0,i)
  29.     t.pd()
  30.     t.setpos(i*-1,300)
  31.     t.pu()
  32.     t.setpos(i,0)
  33.     t.pd()
  34.     t.setpos(300,i*-1)
  35.     t.pu()
  36. for i in range(0, -300, -10):
  37.     t.setpos(i,0)
  38.     t.pd()
  39.     t.setpos(-300,i*-1)
  40.     t.pu()
  41.     t.setpos(0,i)
  42.     t.pd()
  43.     t.setpos(i*-1,-300)
  44.     t.pu()  
  45. for i in range(0, 300, 10):
  46.     t.setpos(0,i)
  47.     t.pd()
  48.     t.setpos(i,300)
  49.     t.pu()
  50.     t.setpos(i,0)
  51.     t.pd()
  52.     t.setpos(300,i)
  53.     t.pu()
  54. for i in range(0, -300, -10):
  55.     t.setpos(i,0)
  56.     t.pd()
  57.     t.setpos(-300,i)
  58.     t.pu()
  59.     t.setpos(0,i)
  60.     t.pd()
  61.     t.setpos(i,-300)
  62.     t.pu()
  63. t.exitonclick()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement