fork(10) download
  1. import Tkinter
  2. import turtle
  3. turtle.getscreen().clear
  4. t = turtle.Turtle()
  5. height = turtle.window_height()
  6. width = turtle.window_width()
  7. t.penup()
  8. t.goto(0, -400)
  9. t.pendown()
  10. print height
  11. print width
  12. h = 610
  13. def pentagon():
  14. t.forward(h)
  15. t.left(72)
  16.  
  17. pentagon()
  18. pentagon()
  19. pentagon()
  20. pentagon()
  21. pentagon()
  22.  
  23.  
  24. def pentagram():
  25. t.forward(h)
  26. t.left(144)
  27.  
  28. def pentagram():
  29. t.forward(h)
  30. t.left(144)
  31.  
  32. h = float(h*1.6180339887)
  33. t.left(36)
  34.  
  35. pentagram()
  36. pentagram()
  37. pentagram()
  38. pentagram()
  39. pentagram()
  40.  
  41. while(1):
  42.  
  43. h = float(h / 1.6180339887)
  44. h = float(h / 1.6180339887)
  45. t.left(36)
  46. pentagram()
  47. t.left(144)
  48. pentagram()
  49. pentagram()
  50. pentagram()
  51. pentagram()
  52. pentagram()
  53.  
  54. turtle.getscreen().exitonclick()
  55.  
  56.  
  57.  
Runtime error #stdin #stdout 0.02s 4752KB
stdin
Standard input is empty
stdout
Standard output is empty