fork download
  1. import math
  2. from TurtleWorld import *
  3. world = TurtleWorld()
  4. t = Turtle()
  5. t.delay = 0.01
  6.  
  7. def polygon(t, n):
  8. length = 10
  9. degree = 360 / n;
  10. pd(t)
  11. for i in range(int(n)):
  12. fd(t, length)
  13. lt(t, degree)
  14.  
  15. def circle(t, r):
  16. circumference = r * 2 * math.pi
  17. n = circumference / 10
  18. polygon(t, n)
Runtime error #stdin #stdout #stderr 0.04s 9984KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 2, in <module>
ImportError: No module named 'TurtleWorld'