fork download
  1. #!/usr/bin/python
  2. import turtle
  3. t=turtle
  4. move=1
  5.  
  6. turtle.speed(0)
  7.  
  8. for i in range(3) :
  9. for c in ['red', 'blue']:
  10. t.color(c)
  11. t.forward(300)
  12. t.left(90)
  13. t.forward(300)
  14. t.left(90)
  15. for i in range(12) :
  16. for c in ['red', 'blue']:
  17. t.color(c)
  18. t.forward(300)
  19. t.left(91)
  20. t.forward(300)
  21. t.left(91)
  22.  
  23.  
  24. turtle.done()
  25. turtle.exitonclick()
Runtime error #stdin #stdout #stderr 0.13s 26632KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "prog.py", line 6, in <module>
  File "<string>", line 1, in speed
  File "/usr/lib/python2.7/lib-tk/turtle.py", line 3714, in _getpen
    Turtle._pen = Turtle()
  File "/usr/lib/python2.7/lib-tk/turtle.py", line 3703, in __init__
    Turtle._screen = Screen()
  File "/usr/lib/python2.7/lib-tk/turtle.py", line 3552, in Screen
    Turtle._screen = _Screen()
  File "/usr/lib/python2.7/lib-tk/turtle.py", line 3568, in __init__
    _Screen._root = self._root = _Root()
  File "/usr/lib/python2.7/lib-tk/turtle.py", line 458, in __init__
    TK.Tk.__init__(self)
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1712, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable