
   K#H                   r    S r SSKJrJrJr  SSKJrJr  S r	S r
\S:X  a  \
" 5       r\" \5        \" 5         gg)a@  turtle-example-suite:

          tdemo_wikipedia3.py

This example is
inspired by the Wikipedia article on turtle
graphics. (See example wikipedia1 for URLs)

First we create (ne-1) (i.e. 35 in this
example) copies of our first turtle p.
Then we let them perform their steps in
parallel.

Followed by a complete undo().
    )ScreenTurtlemainloop)perf_countersleepc                 x   U /n[        SU5       H:  nU R                  5       nUR                  SU-  5        UR                  U5        Un M<     [        U5       H^  n[	        US-  U-
  5      US-  -  nU H>  nUR                  SU-  5        UR                  SU-
  SU5        UR                  U5        M@     M`     g )N   g     v@g       @gffffff?r   )rangeclonertappendabspencolorfd)pnesz
turtlelistiqcts           )/usr/lib/python3.13/turtledemo/rosette.pymn_eckr      s    J1R[GGI	U2X!	 
 2Y3qM2b5! ADDbMJJqs1QDDH 	     c                  x   [        5       n U R                  S5        [        5       nUR                  S5        UR	                  5         UR                  S5        UR                  S5        U R                  SS5        [        5       n[        USS5        [        5       nX2-
  n[        S5        [        5       n[        S U R                  5        5       5      (       aN  U R                  5        H  nUR                  5         M     [        S U R                  5        5       5      (       a  MN  [        5       nS	XC-   U-
  -  $ )
Nblackr   red   $      r	   c              3   @   #    U  H  oR                  5       v   M     g 7f)N)undobufferentries).0r   s     r   	<genexpr>main.<locals>.<genexpr>7   s     9[!!##[s   zruntime: %.3f sec)r   bgcolorr   speed
hideturtler   pensizetracerclockr   r   anyturtlesundo)sr   atetz1r   s         r   mainr4   $   s    AIIghAGGAJLLNJJuIIaLHHRN	B
1b"	B	B	!H	B
9QYY[9
9
9AFFH  9QYY[9
9
9 
B"%(++r   __main__N)__doc__turtler   r   r   timer   r,   r   r   r4   __name__msgprint r   r   <module>r=      sA    , + -",4 z
&C	#JJ r   