Advertisement
pleabargain

turtle pitchfork from Python for Kids

Mar 26th, 2013
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.99 KB | None | 0 0
  1. import turtle#this will create a large circle and a sm one inside
  2. a = turtle.Pen()
  3. b = turtle.Pen()
  4. c = turtle.Pen()
  5. d = turtle.Pen()
  6.  
  7. def dt():
  8.     #turtle.write("d1", font=("Arial", 15, "bold"))
  9.     d.forward(50)
  10.     d.left(90)
  11.     d.forward(50)
  12.     d.right(90)
  13.     d.forward(70)
  14.     #d.setpos(x,y)
  15.     d.write('d ', font=("Arial", 15, "bold"))
  16.     #d.write(d.ycor, font=("Arial", 15, "bold"))# error on screen!
  17.     #How to get the text at the END of the line???
  18.  
  19. def ct():    
  20.     c.forward(50)
  21.     c.left(90)
  22.     c.forward(20)
  23.     c.right(90)
  24.     c.forward(50)
  25.     c.write('c', font=("Arial", 15, "bold"))
  26.  
  27.    
  28. def bt():
  29.     b.forward(50)
  30.     b.right(90)
  31.     b.forward(20)
  32.     b.left(90)
  33.     b.forward(50)
  34.     b.write('b', font=("Arial", 15, "bold"))
  35.    
  36. def at():    
  37.     a.forward(50)
  38.     a.right(90)
  39.     a.forward(50)
  40.     a.left(90)
  41.     a.forward(70)
  42.     a.write('a', font=("Arial", 15, "bold"))
  43.    
  44. at()
  45. bt()
  46. ct()
  47. dt()
  48.  
  49.  
  50. turtle.exitonclick()# very useful
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement