Index: Doc/library/turtle.rst =================================================================== --- Doc/library/turtle.rst (revision 86350) +++ Doc/library/turtle.rst (working copy) @@ -23,6 +23,18 @@ direction it is facing, drawing a line as it moves. Give it the command ``turtle.left(25)``, and it rotates in-place 25 degrees clockwise. +.. sidebar:: Turtle Star + + Turtle can draw intricate shapes using programs that repeat simple + moves. + + |Turtle Star| + + .. literalinclude:: ../includes/turtle-star.py + + +.. |Turtle Star| image:: turtle-star.png + By combining together these and similar commands, intricate shapes and pictures can easily be drawn. Index: Doc/library/turtle-star.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: Doc/library/turtle-star.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: Doc/includes/turtle-star.py =================================================================== --- Doc/includes/turtle-star.py (revision 0) +++ Doc/includes/turtle-star.py (revision 0) @@ -0,0 +1,10 @@ +from turtle import * +color('red', 'yellow') +begin_fill() +while True: + forward(200) + left(170) + if abs(pos()) < 1: + break +end_fill() +done() Property changes on: Doc/includes/turtle-star.py ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native